Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

lowercase order value in dpctl.tensor.copy() #1372

Copy link
Copy link
@antonwolfy

Description

@antonwolfy
Issue body actions

It looks dpctl doesn't properly handle lowercase order value in dpctl.tensor.copy():

import dpctl, dpctl.tensor as dpt

a = dpt.ones(10)

# works with dpt.asarray
dpt.asarray(a, order='c')
# Out: usm_ndarray([1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], dtype=float32)

# but caused an exception with dpt.copy
dpt.copy(a, order='c')
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[3], line 1
----> 1 dpt.copy(a, order='c')

File ~/miniconda3/envs/dpnp_dev/lib/python3.9/site-packages/dpctl/tensor/_copy_utils.py:536, in copy(usm_ary, order)
    534         copy_order = "F"
    535 else:
--> 536     raise ValueError(
    537         "Unrecognized value of the order keyword. "
    538         "Recognized values are 'A', 'C', 'F', or 'K'"
    539     )
    540 if order == "K":
    541     R = _empty_like_orderK(usm_ary, usm_ary.dtype)

ValueError: Unrecognized value of the order keyword. Recognized values are 'A', 'C', 'F', or 'K'
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.