Is it useful to set a fraction number here to the mask value?
Robert
rxjwg98 at gmail.com
Thu Nov 30 18:16:35 EST 2017
Hi,
I am new to Python. Now I follow a thread on mask array usage on line:
https://stackoverflow.com/questions/31563970/fitting-a-binomial-distribution-with-pymc-raises-zeroprobability-error-for-certa
I understand the problem, but I don't understand the answer follow the link.
Because the 'mask' array is composed of integer, if it is assigned a fraction
number as suggested a 1.5, it will be formatted to an integer 1.
observed_values = sp.random.binomial(n = 10.0, p = 0.1, size = 100)
...
mask = sp.zeros_like(observed_values)
Are you clear the answer's meaning?
"You can give it a non-integer value in order to avoid the problem that you cite.
For example, if you fill with, say, 1.5 that should work."
Thanks in advance
More information about the Python-list
mailing list