8000 Implement kinds (`Fixed`, `Scalar`, etc...), as in in Dynd · Issue #203 · blaze/datashape · GitHub
[go: up one dir, main page]

Skip to content

Implement kinds (Fixed, Scalar, etc...), as in in Dynd #203

Open

Description

@jcrist

In blaze/datashape var is used as the dimension of a table with unknown length (e.g. "var * {a: int32, b: float64}". In DyND this would be "Fixed * {a: int32, b: float64}", as var indicates variable length elements. Since both DyND and Datashape ideally use the same type system, we should remedy this.

A good first step would be implementing the "Kinds", which are similar to, but different from TypeVar. Basically, kinds match on properties of the value they match, but not all matches are equivalent. @izaid will be able to clarify more here. This will be best illustrated by example:

# A square array of int32
"N * N * int32"
# A 2d array with fixed dimensions, but not necessarily square
"Fixed * Fixed * int32"
# This would match
"10 * 3 * int32"
# But not
"10 * var * int32"
# which would be a "ragged array" in dynd.

Activity

  1. izaid commented on Dec 15, 2015

    @izaid

    This is great, thanks @jcrist. I'm +1 to this, with the caveat that current Datashape should only get those kinds that are really necessary. Of which Fixed is definitely an example.

  2. kwmsmith commented on Dec 16, 2015

    @kwmsmith
    Member

    I'm in favor of Datashape and DyND alignment here, too.

    Implementing the Kinds in Datashape will be an improvement and is not an issue.

    Using var properly in Datashape and Blaze will be a significant breaking change. For that reason, we will have to consider the cost of this change, and likely have a deprecation release before implementing fully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0