Skip to content

Are Float, Int, Boolean correct types for V #56

@benikm91

Description

@benikm91

Currently, we use Float, Int, and Boolean for our Value Type V in Tensor.

val x: Tensor[T, Float] = Tensor(shape).fromArray(5f)

Using the existing Scala Types was somewhat arbitrary. And I see several issues:

  • Tensor[T, Float] implies that it is float32, however, we track the precision in the internal dtype
  • Tensor[T, Float] implies that Tensor[T, Double], Tensor[T, Byte] exists, but we want to track precision only internal.
  • Scala has no unsigned type like UInt, which we should support (Natural Numbers).

I suggest moving to custom types: Floating, Integer, Bool

Lets use this issue as discussion for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions