Skip to content

unexpected order of array created with reshape #693

Closed

Description

@densmirn

Reproducer:

>>> import dpctl.tensor as dpt
>>> a = dpt.usm_ndarray((1,))
>>> a[0] = 7
>>> b = dpt.usm_ndarray((1,))
>>> b[0] = a[0]
>>> c = dpt.reshape(b, (1,))
>>> a.flags&1
1
>>> b.flags&1
1
>>> c.flags&1
0

dpctl version:

>>> import dpctl
>>> dpctl.__version__
'0.11.0+25.g29c2cbc3'

Activity

  1. oleksandr-pavlyk commented on Nov 29, 2021

    @oleksandr-pavlyk
    Contributor

    Simpler:

    In [1]: import dpctl.tensor as dpt
    
    In [2]: X = dpt.usm_ndarray((1,), dtype='i8', buffer="device", strides=(0,))
    
    In [3]: X.flags
    Out[3]: 0
    
  2. added a commit that references this issue on Nov 29, 2021
    ddafefe
  3. added a commit that references this issue on Nov 30, 2021
    cd85369
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions