Respect __array__ and __array_interface__ for string types
__array__ fixes use-cases like:
import tensorflow as tf
import pandas as pd
series = pd.Series(['a','b','c'])
tf.constant(series)
df = pd.DataFrame({'a':[1,2,3],'b':['a','b','c']})
tf.data.Dataset.from_tensor_slices(dict(df))
PiperOrigin-RevId: 172372593
Loading
Please sign in to comment