1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
Description: Cast the return type of numpy.ceil to an integer type
Cast the return type of numpy.ceil to an integer type as numpy 0.18 linspace
has now fully deprecated previously warned behaviour for floats used as step
size.
Author: Jeremy Reeves
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=982471
Applied-Upstream: commit:6944c4c382bca6bc07aafbfcbe750c27fb07baee
Reviewed-by: "g.l. gragnani" <gianluigi.gragnani@unige.it>,
Étienne Mollier <etienne.mollier@mailoo.org>
Last-Update: 2021-02-21
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- openems.orig/CSXCAD/python/CSXCAD/SmoothMeshLines.py
+++ openems/CSXCAD/python/CSXCAD/SmoothMeshLines.py
@@ -62,7 +62,7 @@
# very large range and easy start/stop res
if start_res>=(max_res/ratio) and stop_res>=(max_res/ratio):
- N = np.ceil(rng/max_res)
+ N = np.ceil(rng/max_res).astype('int')
return np.linspace(start, stop, N+1)
def one_side_taper(start_res, ratio, max_res):
@@ -263,4 +263,4 @@
# print(ol)
plt.plot(ol, ol, 'r*')
- plt.show()
\ No newline at end of file
+ plt.show()
|