diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-07-03 09:41:49 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-07-03 09:41:49 +0000 |
commit | 6b7f2361d969f0ceda30c5fb10a309531aa27c03 (patch) | |
tree | db63d701bf994eb27e28099543ba4ec7b84c3ad2 /numpy/core/_internal.py | |
parent | c5f757c13b831d6ea4bfda80202b4e8ad0600574 (diff) | |
download | numpy-6b7f2361d969f0ceda30c5fb10a309531aa27c03.tar.gz |
Convert docstrings to reflect change to floating-point defaults.
Diffstat (limited to 'numpy/core/_internal.py')
-rw-r--r-- | numpy/core/_internal.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/numpy/core/_internal.py b/numpy/core/_internal.py index 0ff6c0d73..35055fb64 100644 --- a/numpy/core/_internal.py +++ b/numpy/core/_internal.py @@ -195,9 +195,18 @@ class _ctypes(object): except ImportError: raise AttributeError, "ctypes not available" self._arr = array - + + def data_as(self, obj): + return self._ctypes.cast(self._arr._as_parameter_, obj) + + def shape_as(self, obj): + return (obj*self._arr.ndim)(*self._arr.shape) + + def strides_as(self, obj): + return (obj*self._arr.ndim)(*self._arr.strides) + def get_data(self): - return self._ctypes.c_void_p(self._arr.__array_interface__['data'][0]) + return self._ctypes.c_void_p(self._arr._as_parameter_) def get_shape(self): return (_getintp_ctype()*self._arr.ndim)(*self._arr.shape) |