Closed zurk closed 5 years ago
@zurk I need a test extension which actually checks this, because your previous test passed.
That's why It is weird and usually, it is ok to get the length of numpy array.
import numpy
len(numpy.array([]))
Out[3]: 0
len(numpy.array([1,2,3]))
Out[4]: 3
len(numpy.array(["1","2","34"]))
Out[5]: 3
and TypeError: 'int' object is not callable
makes no sence.
I will try to google the error I had and see what I can do.
it is an asdf issue. if you save and load numpy.ndarray
it has int
in its __len__
magic method.
So I cannot add tests because it is a bug in asdf. Going to report the issue.
@vmarkovtsev here https://github.com/spacetelescope/asdf/issues/671 let's merge the PR, I cannot add a test as you asked, because actually, it should work.
Go ahead and add the ASDF test - exactly how you wrote in the issue. It is a feature, not a bug.
For some reason len function for numpy array gives weird error sometimes:
lengths.shape[0] works smoothly.