Python Forum
Numpy returns "TypeError: unsupported operand type(s) for *: 'numpy.ufunc' and 'int'"
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Numpy returns "TypeError: unsupported operand type(s) for *: 'numpy.ufunc' and 'int'"
#3
"np.sign" is not used correctly; check the parentheses (see doc; for instance:

import numpy as np
A=np.sign(-10.59)
print(f"A={A}")
B=np.sign(1586.22)
print(f"B={B}")
Reply


Messages In This Thread
RE: Numpy returns "TypeError: unsupported operand type(s) for *: 'numpy.ufunc' and 'int'" - by paul18fr - Jul-19-2022, 06:31 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  TypeError: '>' not supported between instances of 'numpy.str_' and 'int' Anouar 0 318 Apr-26-2024, 09:34 AM
Last Post: Anouar
  Bitwise Operations in numpy Sowmya 3 447 Apr-03-2024, 02:51 PM
Last Post: deanhystad
  [Numpy] How to store different data type in one numpy array? water 7 894 Mar-26-2024, 02:18 PM
Last Post: snippsat
  TypeError: unhashable type: 'Series' bongielondympofu 2 750 Mar-14-2024, 06:12 PM
Last Post: deanhystad
  [Numpy] Load date/time from .txt to 'datetime64' type. water 4 874 Mar-01-2024, 11:16 PM
Last Post: Gribouillis
  [pandas] TypeError: list indices must be integers or slices, not str but type is int. cspower 4 1,045 Dec-30-2023, 09:38 AM
Last Post: Gribouillis
  numpy.ufunc - Arguments missunderstand MarioBruza 0 918 Jan-11-2023, 05:03 AM
Last Post: MarioBruza
  reshaping 2D numpy array paul18fr 3 1,112 Jan-03-2023, 06:45 PM
Last Post: paul18fr
  Pandas dataframes and numpy arrays bytecrunch 1 1,404 Oct-11-2022, 08:08 PM
Last Post: Larz60+
Question about Numpy indexing. water 1 1,525 Jan-18-2022, 09:52 PM
Last Post: paul18fr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020