You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to create an ivy.array from a list or NumPy array that contains string elements, the operation fails. This is problematic as it limits the ability to work with categorical data in ivy.
Steps to Reproduce Bug
Reproduction Steps
Create a list or NumPy array with string elements: data = ['apple', 'banana', 'cherry']
Attempt to create an ivy.array: ivy_array = ivy.array(data)
Expected Behavior
The expected behavior is for ivy to create an array object that can handle string elements, similar to how NumPy handles arrays of strings.
Actual Behavior
The operation fails with the following error message: ivy.utils.exceptions.IvyException: numpy: nested_map: numpy: nested_map: numpy: default_dtype: numpy: is_complex_dtype: numpy: as_ivy_dtype: Cannot convert to ivy dtype. apple is not supported by NumPy backend.
Environment
Environment
ivy version: 0.0.9.0
Python version: 3.10.
Operating System: Ubuntu 20.04.6
Ivy Version
0.0.9.0
Backend
NumPy
TensorFlow
PyTorch
JAX
Device
CPU
The text was updated successfully, but these errors were encountered:
data = ['apple', 'banana', 'cherry']
ivy.array(data,dtype=object)
the defauly dtype of Ivy array is float, hence we need to pass object dtype when creating a object array
Bug Explanation
Description
When attempting to create an
ivy.array
from a list or NumPy array that contains string elements, the operation fails. This is problematic as it limits the ability to work with categorical data inivy
.Steps to Reproduce Bug
Reproduction Steps
data = ['apple', 'banana', 'cherry']
ivy.array
:ivy_array = ivy.array(data)
Expected Behavior
The expected behavior is for
ivy
to create an array object that can handle string elements, similar to how NumPy handles arrays of strings.Actual Behavior
The operation fails with the following error message:
ivy.utils.exceptions.IvyException: numpy: nested_map: numpy: nested_map: numpy: default_dtype: numpy: is_complex_dtype: numpy: as_ivy_dtype: Cannot convert to ivy dtype. apple is not supported by NumPy backend.
Environment
Environment
Ivy Version
0.0.9.0
Backend
Device
CPU
The text was updated successfully, but these errors were encountered: