-
Notifications
You must be signed in to change notification settings - Fork 85
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
Memory leak when assigning a numpy array to .vec atribute? #25
Comments
Thanks for the bug report! I found an example in the docs showing that you really need to use a separate pointer for |
Thanks for the fix! P.S. I was thinking, could you add the some examples how to convert E.g.
|
…s conversions @jsbtic suggested as a comment on issue #25 that the conversions to/from float arrays should be documented on the README. While adding that and mentioning the other conversions, I realized there was no conversion from quaternions to spherical coordinates. I have added that function and a test, along with the documentation.
Good idea. I myself frequently forget how to do these conversions. I've added it to the README. Thanks again! |
Dear all,
I ran into some memory problems when changing the values of a quaternion object's
.vec
-attribute. This becomes exceedingly problematic in for loops, where memory consumptions increases steadily after every iteration step.C.f. using
memory_profiler
package, v. 0.41 (conda install -c anaconda memory_profiler
)(use
mprof plot
to show the memory consumption trend.)Here's the code for
quaternion_minimal_example.py
The problem can be solved if one replaces
np.array([0, 0, 0])
withnp.array([0, 0, 0]).tolist()
. Is there perhaps a bug in the quaternion package, or am I just doing something wrong...(?)My best,
The text was updated successfully, but these errors were encountered: