Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jcrist opened this issue Dec 15, 2015 · 2 comments
Open

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

jcrist opened this issue Dec 15, 2015 · 2 comments

Comments

@jcrist
Copy link
Member

jcrist commented Dec 15, 2015

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.
@izaid
Copy link

izaid commented Dec 15, 2015

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.

@kwmsmith
Copy link
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
Projects
None yet
Development

No branches or pull requests

3 participants