Skip to content

Commit

Permalink
Introduce RegularArray for rectilinear blocks of any type of awkward …
Browse files Browse the repository at this point in the history
…array. (#23)

This PR only implements `RegularArray` in C++ and Numba, with all the `__getitem__` cases. The next PR will actually use it in inflating arrays for `__getitem__` of `tuple` and for `newaxis`.

We should also have some actual tests for `__getitem__` of `Ellipsis` and `newaxis`.

* Fewest tests in matrix and rename 'test-requirements.txt' to 'requirements-test.txt'.

* Infrastructure for RegularArray.

* Minimal implementation of RegularArray; can print it out.

* Checkpoint before replacing RegularArray/RegularType into TileArray/TileType.

* Changed my mind about renaming. Switched RegularType to 'size' rather than 'shape'.

* Switched RegularArray to 'size' rather than 'shape'.

* RegularArray::getitem_at.

* Renamed 'unsafe' methods to 'nowrap' and 'check_for_iteration' (more descriptive).

* RegularArray::getitem_range.

* RegularArray::getitem_next of null and at.

* RegularArray::getitem_next of range (advanced and non-advanced).

* RegularArray::getitem_next of array (non-advanced).

* RegularArray::getitem_next of array (advanced).

* Consolidated dynamic_casts of getitem so it will be easier to update.

* Gave NumpyArray::getitem_strides and getitem_next the same treatment: dynamic_casts are consolidated.

* Working on test_numpy.

* test_numpy completely works.

* First RegularArray::getitem_next loop moved to cpu-kernels.

* RegularArray::getitem_next(range) loops moved to cpu-kernels.

* RegularArray::getitem_next(array) loops moved to cpu-kernels; now these are all done.

* RegularArray::setid written, compiles, but untested.

* Testing RegularArray::setid; doesn't work yet.

* RegularArray::setid works now.

* Prepared for Numbafication of RegularArray.

* Boxing and unboxing RegularArray.

* RegularArray's lower_len works.

* RegularArray's lower_getitem_int works.

* RegularArray's lower_getitem_range works.

* Fix 32-bit error in lower_getitem_range.

* Forgot to externalize awkward_regulararray_getitem_carry_64.

* Fixed a bug in lower_getitem_range (don't multiply the step size).

* RegularArray lower_getitem_next(int) works.

* [skip ci] RegularArray lower_getitem_next(range, not advanced) works.

* RegularArray lower_getitem_next(range) works.

* RegularArray lower_getitem_next(array, not advanced) works; also fixed 32-bit bug.

* RegularArray lower_getitem_next(array, advanced) works.

* Try to fix 32-bit again.

* RegularArray (and this PR) is done; the next PR will apply it in various places.
  • Loading branch information
jpivarski authored Nov 20, 2019
1 parent 788d878 commit a0e669a
Show file tree
Hide file tree
Showing 54 changed files with 2,848 additions and 855 deletions.
34 changes: 3 additions & 31 deletions .ci/azure-buildtest-awkward.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,14 @@ jobs:
python.version: "2.7"
python.architecture: "x64"
numpy.version: "1.16.5"
"py35-32bit":
python.version: "3.5"
python.architecture: "x86"
numpy.version: "latest"
"py35-64bit":
python.version: "3.5"
python.architecture: "x64"
numpy.version: "latest"
"py36-32bit":
python.version: "3.6"
python.architecture: "x86"
numpy.version: "latest"
"py36-64bit":
python.version: "3.6"
python.architecture: "x64"
numpy.version: "latest"
"py37-32bit":
python.version: "3.7"
python.architecture: "x86"
numpy.version: "latest"
"py37-64bit":
python.version: "3.7"
python.architecture: "x64"
Expand All @@ -79,7 +67,7 @@ jobs:
- script: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -r test-requirements.txt
python -m pip install -r requirements-test.txt
python -c "import numpy; print(numpy.__version__)"
displayName: "Install"
Expand Down Expand Up @@ -129,7 +117,7 @@ jobs:
- script: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -r test-requirements.txt
python -m pip install -r requirements-test.txt
python -c "import numpy; print(numpy.__version__)"
displayName: "Install"
Expand Down Expand Up @@ -157,34 +145,18 @@ jobs:
python.version: "3.4"
python.architecture: "x64"
numpy.version: "1.13.1"
"py34-np16":
python.version: "3.4"
python.architecture: "x64"
numpy.version: "1.16.5"
"py35-np13":
python.version: "3.5"
python.architecture: "x64"
numpy.version: "1.13.1"
"py35-np*":
python.version: "3.5"
python.architecture: "x64"
numpy.version: "latest"
"py36-np14":
python.version: "3.6"
python.architecture: "x64"
numpy.version: "1.14.5"
"py36-np*":
python.version: "3.6"
python.architecture: "x64"
numpy.version: "latest"
"py37-np14":
python.version: "3.7"
python.architecture: "x64"
numpy.version: "1.14.5"
"py37-np*":
python.version: "3.7"
python.architecture: "x64"
numpy.version: "latest"
"py38-np*":
python.version: "3.8"
python.architecture: "x64"
Expand All @@ -208,7 +180,7 @@ jobs:
sed 's/numpy>=1.13.1/numpy==$(numpy.version)/' requirements.txt > requirements2.txt;
python -m pip install -r requirements2.txt;
fi
python -m pip install -r test-requirements.txt
python -m pip install -r requirements-test.txt
python -c "import numpy; print(numpy.__version__)"
displayName: "Install"
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include requirements.txt test-requirements.txt VERSION_INFO CMakeLists.txt LICENSE README.md
include requirements.txt requirements-test.txt VERSION_INFO CMakeLists.txt LICENSE README.md
recursive-include include *.h
recursive-include src *.cpp
recursive-include awkward1 *.py
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Completed items are ☑check-marked. See [closed PRs](https://github.com/scikit-
* [X] `NumpyArray`: rectilinear, N-dimensional array type without Python/pybind11 dependencies, but intended for Numpy.
* [X] `ListArray`: the new `JaggedArray`, based on `starts` and `stops` (i.e. fully general).
* [X] `ListOffsetArray`: the `JaggedArray` case with no unreachable data between reachable data (gaps).
* [ ] `RegularArray`: rectilinear, N-dimensional array of arbitrary contents, for putting jagged dimensions inside fixed dimensions (for example).
* [X] `RegularArray`: for building rectilinear, N-dimensional arrays of arbitrary contents, e.g. putting jagged dimensions inside fixed dimensions.
* [ ] `RecordArray`: the new `Table` _without_ lazy-slicing.
* [ ] `MaskedArray`, `BitMaskedArray`, `IndexedMaskedArray`: same as the old versions.
* [ ] `UnionArray`: same as the old version; `SparseUnionArray`: the additional case found in Apache Arrow.
Expand Down
2 changes: 1 addition & 1 deletion VERSION_INFO
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.22
0.1.23
3 changes: 2 additions & 1 deletion awkward1/_numba/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@
import awkward1._numba.array.numpyarray
import awkward1._numba.array.listarray
import awkward1._numba.array.listoffsetarray
import awkward1._numba.array.empty
import awkward1._numba.array.emptyarray
import awkward1._numba.array.regulararray
File renamed without changes.
Loading

0 comments on commit a0e669a

Please sign in to comment.