You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Align handling of lam and size in ak.random.poisson to numpy.random.poisson #5016
Traceback (most recent call last):
File "<python-input-24>", line 1, in <module>
ak.random.poisson (lam=ak.array([[1.0,5.0,10.0],[2.0,4.0,6.0]]),size=(2,2,3))
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/doctorandy/projects/arkouda/arkouda/numpy/random/legacy.py", line 950, in poisson
return getGlobalGenerator().poisson(lam, size)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
File "/home/doctorandy/projects/arkouda/arkouda/numpy/random/generator.py", line 948, in poisson
is_single_lambda, lam = float_array_or_scalar_helper("poisson", "lam", lam, size)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/doctorandy/projects/arkouda/arkouda/numpy/random/generator.py", line 1090, in float_array_or_scalar_helper
raise TypeError(f"array of {var_name} must have same size as return size")
TypeError: array of lam must have same size as return size
In numpy, the shape of lam must be broadcastable to size. That's not what arkouda is doing.
Activity
Aligns ak.poisson's handling of lam and size to that of numpy (#5023)