Skip to content

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

Description

@antonwolfy

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

importdpctl, dpctl.tensorasdpta=dpt.ones(10)
# works with dpt.asarraydpt.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.copydpt.copy(a, order='c')
---------------------------------------------------------------------------ValueErrorTraceback (mostrecentcalllast)
CellIn[3], line1---->1dpt.copy(a, order='c')
File~/miniconda3/envs/dpnp_dev/lib/python3.9/site-packages/dpctl/tensor/_copy_utils.py:536, incopy(usm_ary, order)
534copy_order="F"535else:
-->536raiseValueError(
537"Unrecognized value of the order keyword. "538"Recognized values are 'A', 'C', 'F', or 'K'"539 )
540iforder=="K":
541R=_empty_like_orderK(usm_ary, usm_ary.dtype)
ValueError: Unrecognizedvalueoftheorderkeyword. Recognizedvaluesare'A', 'C', 'F', or'K'

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