Both U32 and S32 indicate that your NumPy array is a string array, not a number array. Check whether there are strings in the dataset. If there are, just delete them. In NumPy array, as long as one item is a string, the type returned by the array is a string array.
If you need to convert numpy to floating-point number, please refer to the code:
train= train.astype (float)
train_ target = train_ target.astype (float)
Read More:
- RuntimeError: Found dtype Double but expected Float”
- Keras: Cannot convert ‘auto‘ to EagerTensor of dtype float
- How to Fix Sklearn ValueError: This solver needs samples of at least 2 classes in the data, but the data
- opencv cvtColor dtype issue(error: (-215) )
- Solve the problem of import Cafe: runtimewarning: numpy.dtype Size changed, may indicate binary instability
- Warning when using numpy: runtimewarning: numpy.dtype size changed, may indicate binary incompatibility
- Python error TypeError:can ‘t convert complex to float
- Tensorflow ValueError: Failed to convert a NumPy array to a Tensor
- TypeError: __array__() takes 1 positional argument but 2 were given
- Uncaught TypeError: Failed to execute ‘appendChild’ on ‘Node’: parameter 1 is not of type ‘Node How to Fix
- The registered version of ArcEngine can edit the data in SDE (How to Fix 0x80040356 Error)
- How to Fix “the data of store is lost after Vue refreshes the page”
- How to fix “Outlook data file cannot be accessed” error (Solved)
- How to use C + + function pointer array
- Array of PHP_ diff,array_ intersect,array_ merge, in_ Is there a limit on the number of arrays in array?
- How to Fix Parser rerror: error tokenizing data. C error: expected 2 fields in line 53, saw 3
- How to Fix Session is not Connecting (How to Diagnose it)
- Two dimensional array and pointer to one dimensional array
- [Altium problem] “extra pin u1-22 in normal of part U1”
- How to use Python split() function (split array)