Commit ecfd045
committed
Fix numpy dtype conversion in TensorType
TensorType.dtype must be a string, so the code
has been changed from `self.dtype = np.dtype(dtype).type`,
where the right-hand side is of type `np.generic`, to
`self.dtype = str(np.dtype(dtype))`, where the right-hand
side is a string that satisfies:
`self.dtype == str(np.dtype(self.dtype))`
This doesn't change the behavior of `np.array(..., dtype=self.dtype)`
etc.1 parent b9d4dbc commit ecfd045
1 file changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
72 | | - | |
| 73 | + | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| |||
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
104 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
105 | 108 | | |
106 | 109 | | |
107 | | - | |
108 | | - | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
| |||
0 commit comments