Skip to content

Commit 9115c28

Browse files
committed
added property to array interface
1 parent 41c0349 commit 9115c28

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

spatialmath/baseposelist.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,15 @@ def arghandler(self, arg, convertfrom=(), check=True):
233233

234234
return True
235235

236+
@property
237+
def __array_interface__(self):
238+
"""
239+
Copies the numpy array interface from the first numpy array
240+
so that C extenstions with this spatial math class have direct
241+
access to the underlying numpy array
242+
"""
243+
return self.data[0].__array_interface__
244+
236245
@property
237246
def _A(self):
238247
"""

0 commit comments

Comments
 (0)