Skip to content

Division by scalar raise NotImplementedError #1273

Closed

Description

@npolina4
import dpnp as xp
a = xp.array([2., 4.])
a/2.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/localdisk/work/npolina/ws/dpnp/dpnp/dpnp_array.py", line 304, in __truediv__
    return dpnp.true_divide(self, other)
  File "/localdisk/work/npolina/ws/dpnp/dpnp/dpnp_iface_mathematical.py", line 1675, in true_divide
    return dpnp.divide(*args, **kwargs)
  File "/localdisk/work/npolina/ws/dpnp/dpnp/dpnp_iface_mathematical.py", line 585, in divide
    return call_origin(numpy.divide, x1, x2, dtype=dtype, out=out, where=where, **kwargs)
  File "dpnp/dpnp_utils/dpnp_algo_utils.pyx", line 132, in dpnp.dpnp_utils.dpnp_algo_utils.call_origin
    raise NotImplementedError(f"Requested funtion={function.__name__} with args={args} and kwargs={kwargs} "
NotImplementedError: Requested funtion=divide with args=(<dpnp.dpnp_array.dpnp_array object at 0x7f11c51ef9d0>, 2.0) and kwargs={'dtype': None, 'out': None, 'where': True} isn't currently supported and would fall back on NumPy implementation. Define enviroment variable `DPNP_RAISE_EXCEPION_ON_NUMPY_FALLBACK` to `0` if the fall back is required to be supported without rasing an exception.

Activity

  1. npolina4 commented on Jan 27, 2023

    @npolina4
    ContributorAuthor

    Same problem with subtract and add.

  2. self-assigned this
    on Jan 30, 2023
  3. antonwolfy commented on Feb 17, 2023

    @antonwolfy
    Contributor

    @npolina4, the issue was fixed by above PRs and merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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