Skip to content

toNdArray does not support string tensor #7

@arkanoid87

Description

@arkanoid87

@[1,2,3,4,5].toTensor.toNdArray # OK

@["a","b","c"].toTensor.toNdArray # KO

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]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions