imr-framework / pypulseq

Pulseq in Python
https://pypulseq.readthedocs.io
GNU Affero General Public License v3.0
117 stars 63 forks source link

Import with latest version of numpy not possible #122

Closed schote closed 1 year ago

schote commented 1 year ago

Hi,

I installed pypulseq in a new conda environment, numpy 1.24 was automatically installed as a dependency. When importing pypulseq numpy throws an error because np.float is not supported anymore. Since numpy version 1.20.0 this is deprecated and it is recommended to use float. Since 1.24.0 an error is issued instead of a warning.

To Reproduce Install pypulseq in a fresh environment: pip install pypulseq Import pypulseq import pypulseq as pp Error is raised on the import statement, import is not possible.

Version: pypulseq version: 1.4.0

Workaround After installing pypulseq, I reinstalled numpy with version 1.23 to avoid the error on import. pip install numpy==1.23.0

btasdelen commented 1 year ago

Hi @schote, thanks for reporting this.

This problem is resolved in #115. The version of the PyPI may not include the fix. Since PyPulseq v1.4.0 is in bug fix phase, I would recommend pulling the dev branch directly and using it, rather than installing through pip or conda, until those are updated.

Closing the issue since it is already solved. Feel free to reopen if you want to discuss further.