Python Forum
Help with simplifying a code + np.savetxt()
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with simplifying a code + np.savetxt()
#4
You are trying to add a string to an array of strings. The following is an example that reproduces the error:

>>> import numpy as np
>>> x=np.array(['sdf', 'sdf'])
>>> x + 'fsd'
Error:
numpy.core._exceptions.UFuncTypeError: ufunc 'add' did not contain a loop with signature matching types (dtype('<U3'), dtype('<U3')) -> dtype('<U3')
Reply


Messages In This Thread
RE: Help with simplifying a code + np.savetxt() - by scidam - Jul-21-2020, 06:37 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  issue with numpy.savetxt alyssaantarctica 1 3,964 Jul-13-2018, 03:50 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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