Skip to content

np.left_shift and np.right_shift fail on np.uint64 scalar types (Trac #1930) #2523

Closed

Description

@numpy-gitbot

Original ticket http://projects.scipy.org/numpy/ticket/1930 on 2011-08-10 by trac user tlatorre, assigned to unknown.

>>> np.uint64(5) << 1
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: ufunc 'left_shift' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule 'safe'
>>> np.uint64(5) >> 3
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: ufunc 'right_shift' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule 'safe'

Activity

  1. numpy-gitbot commented on Oct 23, 2012

    @numpy-gitbot
    Author

    @pv wrote on 2012-05-02

    Duplicate of #2524

  2. eric-wieser commented on Dec 2, 2019

    @eric-wieser
    Member

    Locking as a duplicate of #2524

  3. locked and limited conversation to collaborators on Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions