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
Error: type mismatch: got <Tensor[system.string]>
but expected one of:
func toUnsafeView[T: KnownSupportsCopyMem](t: Tensor[T];
aligned: static bool = true): ptr UncheckedArray[T]
first type mismatch at position: 1
required type for t: Tensor[toUnsafeView.T]
but expression 't' is of type: Tensor[system.string]
proc toUnsafeView[T](ndArray: NumpyArray[T]): ptr UncheckedArray[T]
first type mismatch at position: 1
required type for ndArray: NumpyArray[toUnsafeView.T]
but expression 't' is of type: Tensor[system.string]
The text was updated successfully, but these errors were encountered:
Indeed, the current implementation focuses on numerical data, char, bool, int*, uint*, float, complex.
Problem with Tensor[string] is that string are gc-allocated in Nim which means the Tensor is not going to be contiguous so you cannot copyMem it - therefore all you can do is loop over the datas - which is not efficient.
Tensor[string] is really just storing string with fancy indexing on top of it.
@[1,2,3,4,5].toTensor.toNdArray
# OK@["a","b","c"].toTensor.toNdArray
# KOThe text was updated successfully, but these errors were encountered: