We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4a0687a commit 85b3ea5Copy full SHA for 85b3ea5
include/eigenpy/ufunc.hpp
@@ -1,5 +1,5 @@
1
//
2
-// Copyright (c) 2020-2021 INRIA
+// Copyright (c) 2020-2025 INRIA
3
// code aptapted from
4
// https://github.com/numpy/numpy/blob/41977b24ae011a51f64faa75cb524c7350fdedd9/numpy/core/src/umath/_rational_tests.c.src
5
@@ -151,6 +151,7 @@ EIGENPY_REGISTER_BINARY_OPERATOR(greater_equal, >=)
151
}
152
153
EIGENPY_REGISTER_UNARY_OPERATOR(negative, -)
154
+EIGENPY_REGISTER_UNARY_OPERATOR(square, x *)
155
156
} // namespace internal
157
@@ -258,6 +259,7 @@ void registerCommonUfunc() {
258
259
260
// Unary operators
261
EIGENPY_REGISTER_UNARY_UFUNC(negative, type_code, Scalar, Scalar);
262
+ EIGENPY_REGISTER_UNARY_UFUNC(square, type_code, Scalar, Scalar);
263
264
Py_DECREF(numpy);
265
0 commit comments