-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
view_scalars no longer works with type objects #575
Comments
jcrist
changed the title
view_scalars no longer works
view_scalars no longer works with type objects
Feb 4, 2016
Ah, it's because In [49]: t = a.dtype.value_type
In [50]: t
Out[50]:
nd.array(int32,
type="type")
In [51]: t[0]
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-51-d0a24a012877> in <module>()
----> 1 t[0]
dynd/nd/array.pyx in dynd.nd.array.array.__getitem__ (/Users/travis/build/libdynd/dynd-python/build/temp.macosx-10.5-x86_64-3.5/dynd/nd/array.cxx:3253)()
IndexError: provided 1 indices to dynd type type, but only 0 dimensions available
In [52]: t.to(ndt.type)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-52-055b254edf25> in <module>()
----> 1 t.to(ndt.type)
dynd/nd/array.pyx in dynd.nd.array.array.to (/Users/travis/build/libdynd/dynd-python/build/temp.macosx-10.5-x86_64-3.5/dynd/nd/array.cxx:2196)()
TypeError: Can't convert 'type' object to str implicitly
In [53]: ndt.type(t)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-53-55abca7be71c> in <module>()
----> 1 ndt.type(t)
dynd/ndt/type.pyx in dynd.ndt.type.type.__init__ (/Users/travis/build/libdynd/dynd-python/build/temp.macosx-10.5-x86_64-3.5/dynd/ndt/type.cxx:1625)()
dynd/ndt/type.pyx in dynd.ndt.type.as_cpp_type (/Users/travis/build/libdynd/dynd-python/build/temp.macosx-10.5-x86_64-3.5/dynd/ndt/type.cxx:4819)()
TypeError: issubclass() arg 1 must be a class
In [54]: str(t)
Out[54]: 'nd.array(int32,\n type="type")' |
That's a bug (and easy to fix), will do so. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This used to work in dynd 0.7.0, but doesn't work in the new release:
It does work with strings though:
The text was updated successfully, but these errors were encountered: