Commit c283106
authored
* Update optimized `Delta` codec for `bool`
Previously `bool` just worked with `Delta`. However this was not
actually tested. The optimized version switched to `np.subtract` for
in-place computation, which works for other types. Though `bool` needs
special handling. Fortunately this can be done with `np.not_equal`,
which has the same behavior.
Also include a test for `bool` data to make sure this is handled
correctly going forward.
* Simplify type check
This is a bit more succinct and gets to the core point. Namely
`arr.dtype` determines this code path.
Also comparing directly to `bool` works here. It is a bit faster as well
since we need not construct an `np.dtype` object.
* Drop extraneous `0`s
1 parent 9518e0b commit c283106
2 files changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
68 | 71 | | |
69 | 72 | | |
70 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
0 commit comments