-
Notifications
You must be signed in to change notification settings - Fork 7
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
fix inscopix dtype #326
fix inscopix dtype #326
Conversation
Specifically seems that if you ever see array = np.array([1,2,3], dtype="uint16")
type(array[0])
> np.uint16
array[0].dtype
> dtype('uint16') |
Is there a test to add or fix (doesn't look like changing this line in source altered the outcome of a test?) for this |
Unfortunately, np.uint16 == np.dtype(np.uint16) True however np.uint16.itemsize() TypeError: 'getset_descriptor' object is not callable while np.dtype(np.uint16).itemsize 2 I suppose I could test asking for the itemsize |
I believe this might be intended since equality is somewhat looser than saying each side of the expression should be of the same object type (with same methods/attributes, etc) I think the correct assertion would instead be assert extractor.get_dtype() is np.dtype("uint16") |
@CodyCBakerPhD good point. I changed it to |
Apparently
np.uint16
is different fromnp.dtype(np.uint16)