Skip to content
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

bh107: dtype funny business #630

Open
jamesavery opened this issue Jul 7, 2019 · 0 comments
Open

bh107: dtype funny business #630

jamesavery opened this issue Jul 7, 2019 · 0 comments

Comments

@jamesavery
Copy link
Contributor

jamesavery commented Jul 7, 2019

OK, so the dtype is not defined in bh107:

In [1]: import bh107 as bh                                                                                                                                                                                         
In [2]: a = bh.array([1,2,3,4],dtype=bh.float64)                                                                                                                                                                   
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-2-a29eeb4706b2> in <module>
----> 1 a = bh.array([1,2,3,4],dtype=bh.float64)

AttributeError: module 'bh107' has no attribute 'float64'

Fine, then we load it from numpy:

In [3]: import numpy as np                                                                                                                                                                                         
In [4]: a = bh.array([1,2,3,4],dtype=np.float64)                                                                                                                                                                   
In [5]: a.dtype                                                                                                                                                                                                    
Out[5]: numpy.int64

But bh107 just ignores the dtype and picks int64 from looking at the data! Is dtype not a part of bh107? Is one supposed to set the type in some different way?

@jamesavery jamesavery pinned this issue Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant