File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,28 @@ namespace eigenpy
119119 {
120120 return getInstance ().CurrentNumpyType ;
121121 }
122+
123+ static const PyTypeObject * getNumpyMatrixType ()
124+ {
125+ return getInstance ().NumpyMatrixType ;
126+ }
127+
128+ static const PyTypeObject * getNumpyArrayType ()
129+ {
130+ return getInstance ().NumpyArrayType ;
131+ }
132+
133+ static bool isMatrix ()
134+ {
135+ return PyType_IsSubtype (reinterpret_cast <PyTypeObject*>(getInstance ().CurrentNumpyType .ptr ()),
136+ getInstance ().NumpyMatrixType );
137+ }
138+
139+ static bool isArray ()
140+ {
141+ return PyType_IsSubtype (reinterpret_cast <PyTypeObject*>(getInstance ().CurrentNumpyType .ptr ()),
142+ getInstance ().NumpyArrayType );
143+ }
122144
123145 protected:
124146 NumpyType ()
You can’t perform that action at this time.
0 commit comments