Author: mattip <[email protected]>
Branch: numpy-flags
Changeset: r77379:5285b5a3b37e
Date: 2015-05-18 20:24 +0300
http://bitbucket.org/pypy/pypy/changeset/5285b5a3b37e/
Log: add more properties
diff --git a/pypy/module/micronumpy/flagsobj.py
b/pypy/module/micronumpy/flagsobj.py
--- a/pypy/module/micronumpy/flagsobj.py
+++ b/pypy/module/micronumpy/flagsobj.py
@@ -42,6 +42,12 @@
def descr_get_writeable(self, space):
return space.wrap(bool(self.flags & NPY.ARRAY_WRITEABLE))
+ def descr_get_owndata(self, space):
+ return space.wrap(bool(self.flags & NPY.ARRAY_OWNDATA))
+
+ def descr_get_aligned(self, space):
+ return space.wrap(bool(self.flags & NPY.ARRAY_ALIGNED))
+
def descr_get_fnc(self, space):
return space.wrap(bool(
self.flags & NPY.ARRAY_F_CONTIGUOUS and not
@@ -112,6 +118,8 @@
f_contiguous = GetSetProperty(W_FlagsObject.descr_f_contiguous),
fortran = GetSetProperty(W_FlagsObject.descr_f_contiguous),
writeable = GetSetProperty(W_FlagsObject.descr_get_writeable),
+ owndata = GetSetProperty(W_FlagsObject.descr_get_owndata),
+ aligned = GetSetProperty(W_FlagsObject.descr_get_aligned),
fnc = GetSetProperty(W_FlagsObject.descr_get_fnc),
forc = GetSetProperty(W_FlagsObject.descr_get_forc),
)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit