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

Flumpy doesn't work if you haven't imported flex yet #398

Closed
ndevenish opened this issue Jul 9, 2021 · 0 comments · Fixed by #409
Closed

Flumpy doesn't work if you haven't imported flex yet #398

ndevenish opened this issue Jul 9, 2021 · 0 comments · Fixed by #409
Assignees

Comments

@ndevenish
Copy link
Collaborator

Found while checking #392

>>> import numpy as np
>>> import dxtbx.flumpy as flumpy
>>> na = np.array([0,1,2], dtype="l")
>>> flumpy.from_numpy(na)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: Caught an unknown exception!
>>> import scitbx.array_family.flex as flex
>>> flumpy.from_numpy(na)
<scitbx_array_family_flex_ext.long object at 0x7fae1a31c5b0>
@ndevenish ndevenish self-assigned this Jul 9, 2021
ndevenish added a commit to ndevenish/dxtbx that referenced this issue Jul 28, 2021
ndevenish added a commit to ndevenish/dxtbx that referenced this issue Jul 28, 2021
This prevents errors when trying to convert to flex arrays, when scitbx
hasn't been loaded yet.

Fixes cctbx#398.
ndevenish added a commit that referenced this issue Jul 28, 2021
This prevents errors when trying to convert to flex arrays, when scitbx
hasn't been loaded yet.

Fixes #398.
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

Successfully merging a pull request may close this issue.

1 participant