File: 0008-Fix-SmoothMeshLines.py-TypeError.patch

package info (click to toggle)
openems 0.0.35%2Bgit20190103.6a75e98%2Bdfsg.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 8,424 kB
  • sloc: cpp: 40,407; python: 2,028; yacc: 580; makefile: 458; lex: 350; sh: 176; ruby: 19
file content (30 lines) | stat: -rw-r--r-- 1,154 bytes parent folder | download | duplicates (2)
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()