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

RELEASE 0.1.5 #20

Merged
merged 10 commits into from
Oct 2, 2023
Merged

RELEASE 0.1.5 #20

merged 10 commits into from
Oct 2, 2023

Conversation

mducle
Copy link
Member

@mducle mducle commented Jul 3, 2023

Bugfixes for Release 0.1.5

  • Workaround to fix a segfault when temporary numpy arrays are re-used multiple times in definition of SpinW objects.
  • Change behaviour of tuples and lists. Python tuples now always convert to Matlab cells. Nested lists will convert to Matlab numeric arrays if they are consistent in shape and contain only numbers. This allows Python ([1,2,3], [4,5,6]) to convert to Matlab {[1 2 3] [4 5 6]} whereas before it would have converted to Matlab [1 2 3; 4 5 6]. Python [[1,2,3], [4,5,6]] will still convert to Matlab [1 2 3; 4 5 6].
  • Fix bug where Matlab commands which return zero outputs fail, e.g. m.axis([0,1,0,1]) due to incorrectly given nargout in Matlab.py / call.m.
  • New get_nlhs algorithm to set nargout parameters uses ast to better parse cases of nested Matlab calls, like m.eig(m.rand(3)) but this only works if the full command is one one line; and also does not work for the basic interpreter (but should work in Mantid, Jupyter and Spyder). For those cases, the old dis algorithm is used, updated to work with Python 3.11 but does not handle nested calls.
  • Fix bugs in call_python. Changed mechanism back to using a global dict as direct memory address was failing in some nested calls. call_python now creates its own instance of type_converter to avoid a heap memory error when using the Python initialized object from the libpymcr instance. Re-add DEEPBIND library loading for Linux Lapack/BLAS to avoid conflict with Matlab.

@RichardWaiteSTFC RichardWaiteSTFC self-assigned this Jul 17, 2023
@mducle mducle force-pushed the rel15 branch 3 times, most recently from 7940a15 to 06135a4 Compare September 24, 2023 21:26
Change call_python to use global dict
Update to work on Python 3.11
Add setdlopenflags(DEEPBIND) for Linux
@mducle mducle merged commit f34229f into main Oct 2, 2023
6 checks passed
@mducle mducle deleted the rel15 branch February 28, 2024 15:41
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 this pull request may close these issues.

2 participants