File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
numpy/_core/src/multiarray Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -156,17 +156,12 @@ initialize_static_globals(void)
156
156
157
157
// default_truediv_type_tupS
158
158
PyArray_Descr * tmp = PyArray_DescrFromType (NPY_DOUBLE );
159
- if (tmp == NULL ) {
160
- return -1 ;
161
- }
162
-
163
159
npy_static_pydata .default_truediv_type_tup =
164
160
PyTuple_Pack (3 , tmp , tmp , tmp );
161
+ Py_DECREF (tmp );
165
162
if (npy_static_pydata .default_truediv_type_tup == NULL ) {
166
- Py_DECREF (tmp );
167
163
return -1 ;
168
164
}
169
- Py_DECREF (tmp );
170
165
171
166
npy_static_pydata .kwnames_is_copy = Py_BuildValue ("(s)" , "copy" );
172
167
if (npy_static_pydata .kwnames_is_copy == NULL ) {
@@ -225,6 +220,8 @@ initialize_static_globals(void)
225
220
226
221
return 0 ;
227
222
}
223
+
224
+
228
225
/*
229
226
* Verifies all entries in npy_interned_str and npy_static_pydata are
230
227
* non-NULL.
@@ -234,7 +231,6 @@ initialize_static_globals(void)
234
231
* items that are initialized late in module initialization but they
235
232
* should all be initialized by the time this function is called.
236
233
*/
237
-
238
234
NPY_NO_EXPORT int
239
235
verify_static_structs_initialized (void ) {
240
236
// verify all entries in npy_interned_str are filled in
You can’t perform that action at this time.
0 commit comments