Bug#982471: [sprint] python3-openems: SmoothMeshLines.py does not work with recent versions of numpy
Étienne Mollier
etienne.mollier at mailoo.org
Sun Feb 21 10:17:13 GMT 2021
Control: tag -1 patch
Control: tag -1 confirmed
Control: tag -1 pending
Control: tag -1 upstream
Greetings,
On Wed, 10 Feb 2021 16:29:06 +0100 "g.l. gragnani" <gianluigi.gragnani at unige.it> wrote:
> the version of the CSXCAD python interface is a little bit outdated and the function
> SmoothMeshLines.py raises the following error:
>
> File "/usr/lib/python3/dist-packages/CSXCAD/SmoothMeshLines.py", line 66, in SmoothRange
> return np.linspace(start, stop, N+1)
> File "<__array_function__ internals>", line 5, in linspace
> File "/usr/lib/python3/dist-packages/numpy/core/function_base.py", line 113, in linspace
> num = operator.index(num)
> TypeError: 'numpy.float64' object cannot be interpreted as an integer
I could reproduce the error message with the small test suite
embedded at the end of the SmoothMeshLines.py file, using the
command:
$ python3 /usr/lib/python3/dist-packages/CSXCAD/SmoothMeshLines.py
> This has been fixed upstream and is due to line 65, which should read
> N = np.ceil(rng/max_res).astype('int')
> instead of
> N = np.ceil(rng/max_res)
I can confirm this helps with the small test. By appending your
fix, I could spawn the expected window with the line instead of
the crash. This shouldn't bring regressions in other areas
hopefully. I'm preparing a patch and will upload soon.
Thanks for your report!
Have a nice day, :)
--
Étienne Mollier <etienne.mollier at mailoo.org>
Fingerprint: 8f91 b227 c7d6 f2b1 948c 8236 793c f67e 8f0d 11da
Sent from /dev/pts/7, please excuse my verbosity.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20210221/8cb5396c/attachment.sig>
More information about the debian-science-maintainers
mailing list