This repository has been archived by the owner on Jun 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 39
[WIP] Table in awk-cpp #146
Open
duynht
wants to merge
98
commits into
master
Choose a base branch
from
awk-cpp-table
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Added parents2startsstops_int64 and *_int32 - Added positive tests for both
- Added uniques2offsetsparents - Fixed some warnings about signed/unsigned ints in for loops - Added test for uniques2offsetsparents
I think this works? - Changed _jagged.cpp src file to hold a struct called "JaggedArraySrc" - Changed jagged.py to inherit from JaggedArraySrc before awkward.array.jagged.JaggedArray
- Changed all methods to templated methods, where each argument type is specified in the pybind11 module at the bottom. - Removed positive tests for different types, because that could get unnecessarily large for other methods - Removed most of the jagged.py methods except for the ones which require python-side functionality (arbitrary types, none-type parameters... basically stuff that's much much easier in python)
I've been debugging for hours - I'm just gonna put this down and pick it up tomorrow
I learned a lot today, but tomorrow I'm probably going to scrap most of what I wrote and follow the pybind11 numpy guide on accepting py::buffer types into a custom c++ type.
I need to reset and try again... I can't get around the fact that every function needs to be compiled for every data type, and that C++ doesn't have a data type class
This reverts commit a0a519e.
This reverts commit f2e5f2d.
This reverts commit 075fb96.
Well I learned a lot today. I figured template metaprogramming was a little complicated for this, but I might see if I can implement it later. This one is more straightforward to understand. - Added a macro to compile each method for signed and unsigned ints from 8-bit to 64-bit - TODO: handle incompatible sizes in-method - TODO: handle multidimensional array input in-method - TODO: handle array strides
Applied type casts for warnings which pointed out 8-bit and 16-bit int conversions
Just going to put this here to see if it fixes that
Something went wrong with travis a couple commits back, so I'm cleaning out the unnecessary code
All input types are still handled, but output is now only int64, so that nothing is lost on conversion for index-oriented functions
- changed all size_t instances to ssize_t - removed some unnecessary casts from ssize_t to ssize_t
not sure if this will work but I'll figure it out eventually
That strategy didn't work. This one does... not very elegant but if it fits it ships I guess
- Moved some stuff around to make the code cleaner - Started work on __getitem__
- Added starts setter/getter - Added stops setter/getter - Added a VERY limited getitem function, just for 1d 1-stride int array contents and single integer argument
-Added some exception throws in cases where the JaggedArray is invalid
- Added getter for content_type - Added getter/setter for content_array - Added getter/setter for content_jagged - Added __repr__ with limited functionality
This reverts commit 3bb821b.
…ting the offsets to int32 because Arrow treats it as an uninterpreted buffer)
…naryArray not implemented in pyarrow yet).
Fix choose on non-offsetsaliased jagged arrays
Proposal: class-ify persists.serialize
Return JaggedArray index with correct dtype if empty
[WIP] Collaborate on jaggedarray cpp
Welcome back! At first, I thought this was a huge backlog, but now I see that it's just merging to get up-to-date with master. |
Yes, I just rebased with master, and sorry for the delay. I have been trying to figure things out using the specs but still confuse about the content and views. I think I need some clarification. For now I will try with c-side setters and getters to see if I can use them in magic methods. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Initial PR