blaze / blaze/datashape

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

Open
#203 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
189
Forks
62
PR merge metrics
No merged PRs in 30d

Description

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:

``` python
# 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.
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the datashape type-system implementation and the examples in this issue, then compare the proposed kinds with existing TypeVar matching. The work is done when kinds such as Fixed and Scalar are represented and the documented square-array, fixed-dimension, and ragged-array examples distinguish the intended matches.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.