You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm currently exploring your quaternion module. This is more of a curiosity question that I have rather than an issue, likely arising from to my limited knowledge in python rather than a limitation in your module.
When I try:
import numpy as np
import quaternion as quat
myq = np.quat(0,1,0,0)
I get AttributeError: module 'numpy' has no attribute 'quat'
but
import numpy as np
import quaternion as quaternion
myq = np.quaternion(0,1,0,0)
is fine.
Why can't I import quaternion as whatever_name_I_chose?
The text was updated successfully, but these errors were encountered:
There are two separate things going on here. There's the quaternion module, which you've successfully imported as quat in the first case. Then there's the np.quaternion submodule that gets inserted into numpy (under whatever name you've imported it; in this case np). You can't change the name of the submodule because you didn't directly create it; it's hard-coded in the quaternion.__init__.py file.
Hi, I'm currently exploring your quaternion module. This is more of a curiosity question that I have rather than an issue, likely arising from to my limited knowledge in python rather than a limitation in your module.
When I try:
I get
AttributeError: module 'numpy' has no attribute 'quat'
but
is fine.
Why can't I import quaternion as whatever_name_I_chose?
The text was updated successfully, but these errors were encountered: