File tree 1 file changed +3
-7
lines changed
1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ inline numpy_internals &get_numpy_internals() {
120
120
return *ptr;
121
121
}
122
122
123
- PYBIND11_NOINLINE module_ import_numpy_core_submodule (const char * submodule_name) {
123
+ PYBIND11_NOINLINE module_ import_numpy_core_submodule (const char *submodule_name) {
124
124
module_ numpy = module_::import (" numpy" );
125
125
str version_string = numpy.attr (" __version__" );
126
126
@@ -131,13 +131,9 @@ PYBIND11_NOINLINE module_ import_numpy_core_submodule(const char * submodule_nam
131
131
/* `numpy.core` was renamed to `numpy._core` in NumPy 2.0 as it officially
132
132
became a private module. */
133
133
if (major_version >= 2 ) {
134
- return py::module_::import (
135
- (std::string (" numpy._core." ) + submodule_name).c_str ()
136
- );
134
+ return py::module_::import ((std::string (" numpy._core." ) + submodule_name).c_str ());
137
135
} else {
138
- return py::module_::import (
139
- (std::string (" numpy.core." ) + submodule_name).c_str ()
140
- );
136
+ return py::module_::import ((std::string (" numpy.core." ) + submodule_name).c_str ());
141
137
}
142
138
}
143
139
You can’t perform that action at this time.
0 commit comments