Closed sitongan closed 4 years ago
Sorry, I've been unable to reproduce it:
>>> import numpy
>>> import awkward
>>> numpy.__version__
'1.18.5'
>>> awkward.__version__ # not my development version; a fresh copy from conda-forge
'0.12.22'
>>> awkward.JaggedArray.fromiter([[20.2, 10.1, 30.3, 50.5], [50.5], [60]])
<JaggedArray [[20.2 10.1 30.3 50.5] [50.5] [60.0]] at 0x7fa44f193c90>
>>> awkward.fromiter([[20.2, 10.1, 30.3, 50.5], [50.5], [60]])
<JaggedArray [[20.2 10.1 30.3 50.5] [50.5] [60.0]] at 0x7fa44f193d50>
But hopefully that narrows down your search—you might not be using the versions you think you're using (particularly in Jupyter; it sometimes gets packages from an entirely different installation) or maybe there's something else going on.
If you're just starting a project, you might want to consider Awkward1.
>>> import awkward1 as ak
>>> ak.Array([[20.2, 10.1, 30.3, 50.5], [50.5], [60]])
<Array [[20.2, 10.1, 30.3, 50.5, ... [60]] type='3 * var * float64'>
There's a ak.from_awkward0 and ak.to_awkward0 and you can load both Awkward0 and Awkward1 in the same project, so you can make a gradual transition if necessary.
Confirmed that it's a versioning issue instead(sorry!), thanks!
170
awkward.JaggedArray.fromiter([[20.2, 10.1, 30.3, 50.5], [50.5], [60]])
fails on jupyter notebook only with numpy 1.18.5 and python 3.7.7 on awkward 0.12.22 build pyh9f0ad1d_0 from conda-forge
Update
for fresh conda environment with numpy 1.18.5 and python 3.7.7 on awkward 0.12.22 build pyh9f0ad1d_0 from conda-forge:
on my own laptop MacOS 10.15.5 with Clang 4.0.1 it fails on jupyter notebook only, not in python
on my GPU environment with GCC 7.3.0 it fails in both python and jupyter notebook
`--------------------------------------------------------------------------- TypeError Traceback (most recent call last)