Problems accessing scipp.constants
#3561
-
The following raises an error for me:
But works if I do
Scipp version: 24.9.1 |
Beta Was this translation helpful? Give feedback.
Answered by
SimonHeybrock
Oct 11, 2024
Replies: 1 comment 9 replies
-
Hi! This is by design. Similar to, say SciPy submodules, it is a submodule that needs to be imported explicitly. One reason for this is that it relies on Scipy, which is an optional dependency of Scipp. We will consider adding lazy loading, please see #3567. For now, if you would like to use import scipp as sc
import scipp.constants
sc.constants.h # works now |
Beta Was this translation helpful? Give feedback.
9 replies
Answer selected by
SimonHeybrock
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! This is by design. Similar to, say SciPy submodules, it is a submodule that needs to be imported explicitly. One reason for this is that it relies on Scipy, which is an optional dependency of Scipp.
We will consider adding lazy loading, please see #3567.
For now, if you would like to use
sc.constants
in code, you can