8000 BUG: MaskedArray Objects are Fortran- and C-Contiguous Simultaneously · Issue #6911 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

BUG: MaskedArray Objects are Fortran- and C-Contiguous Simultaneously #6911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gfyoung opened this issue Dec 31, 2015 · 3 comments
Closed

BUG: MaskedArray Objects are Fortran- and C-Contiguous Simultaneously #6911

gfyoung opened this issue Dec 31, 2015 · 3 comments

Comments

@gfyoung
Copy link
Contributor
gfyoung commented Dec 31, 2015
>>> from numpy.ma.core import MaskedArray
>>> from numpy import isfortran
>>> m = MaskedArray([1, 2, 3])
>>> m
masked_array(data = [1 2 3],
             mask = False,
       fill_value = 999999)
>>> m.flags
  C_CONTIGUOUS : True
  F_CONTIGUOUS : True
  OWNDATA : False
  WRITEABLE : True
  ALIGNED : True
  UPDATEIFCOPY : False
>>> isfortran(m)
False

OS: Windows (win32)
Python: 2.7.11 (32-bit)
Numpy: v1.10.2

I think it may be related to #6646, but I'm not sure yet.

@njsmith
Copy link
Member
njsmith commented Dec 31, 2015

That's because this array actually is both C and F contiguous :-). This is the "relaxed strides checking" change, which makes the contiguity flags simply determined by the array's memory layout and nothing else.

(And IIRC isfortran has some really confusing semantics/confusing name where it actually tests F-but-not-C contiguity.)

@njsmith
Copy link
Member
njsmith commented Dec 31, 2015

Anyway, closing because I think that's all there is here, but definitely reopen if I'm missing something.

@njsmith njsmith closed this as completed Dec 31, 2015
@gfyoung
Copy link
Contributor Author
gfyoung commented Dec 31, 2015

Ah, okay, good to know. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0