-
Notifications
You must be signed in to change notification settings - Fork 125
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
Support operations using new signed and unsigned integers dtypes #794
Comments
This was referenced Jan 4, 2024
Closed
The first batch is in the referred PR. Tomorrow I'm going to double check for more places that we may need to change. |
philss
added a commit
that referenced
this issue
Jan 16, 2024
* Support signed/unsigned dtypes in aggregation for series This is part of #794 * WIP: need to fix casting before subtract * Fix issues after rebase * Fix min/max, categorise and subtract from Series This is to make them work with integers. * Divide will always give a f64 * Make Series.subtract/2 work by mixing int dtypes * More tests to `Series.divide/2` * Fix `Series.in/2` to support mixing integer dtypes * Fix Series.peaks/2 to support more numeric dtypes * Fix Series.quotient/2 to work with mixied int dtypes * Make `Series.rank/2` return a u32 series for ordinal ranking * Document about mixing series of different dtypes on select/2 * Ensure that we are "targeting" the right dtype This changes a little bit the algorithm for the "out_dtype" in some arithmetic operations. * Fix `Series.remainder/2` to work with more int dtypes * Fix "DF.dummies/2" to use :u8 columns instead of :s64 * Refactor to use "right" int types in Series' min/max/sum * Use u32 in Series.argsort/2 * Update lib/explorer/series.ex Co-authored-by: Billy Lanchantin <[email protected]> * Simplify calculation of out_dtype in arithmetic ops * Move cast to rust code in "Series.subtract/2" The idea is to have fewer series in memory. * Fix cast_to_divide * Simplify rule for subtract unsigned integers Overflow may occur, but it's fine.
philss
added a commit
that referenced
this issue
Jan 18, 2024
josevalim
pushed a commit
that referenced
this issue
Jan 19, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The idea is to make sure we can support the most number of operations with these new dtypes,
including mixing them when it makes sense.
Series
Aggregation
Explore.Series.min/1
andExplore.Series.max/1
- Support more integer dtypes in Series #824Explore.Series.mean/1
andExplore.Series.median/1
- Support more integer dtypes in Series #824Explore.Series.product/1
- Support more integer dtypes in Series #824Explore.Series.skew/2
- Support more integer dtypes in Series #824Explore.Series.standard_deviation/2
- Support more integer dtypes in Series #824Explore.Series.sum/1
- Support more integer dtypes in Series #824Explore.Series.variance/1
- Support more integer dtypes in Series #824Element-wise
Explorer.Series.add/2
mixing signed and unsigned series - Support more integer dtypes in Series #824Explorer.Series.categorise/2
with indexes of{:u, size}
- Support more integer dtypes in Series #824Explorer.Series.divide/2
with both sides of{:u, size}
, or mixing{:u, size}
and{:s, size}
- Support more integer dtypes in Series #824Explorer.Series.remainder/2
with left or right of{:u, size}
(raised insideSeries.filter_with/2
) - Support more integer dtypes in Series #824Explorer.Series.in/2
- Support more integer dtypes in Series #824Explorer.Series.subtract/2
(using the example ofmap_with
) - Support more integer dtypes in Series #824Explorer.Series.subtract/2
(using the example ofmap_with
) - Support more integer dtypes in Series #824Explorer.Series.multiply/2
with{:u, size}
and mixing int types - Support more integer dtypes in Series #824Explorer.Series.peaks/2
- Support more integer dtypes in Series #824Explorer.Series.quotient/2
with{:u, size}
is casted to{:s, 64}
. Could keep the dtype - Support more integer dtypes in Series #824Explorer.Series.rank/2
withmethod: :ordinal
could return a{:u, size}
series - Support more integer dtypes in Series #824Explorer.Series.select/3
mixing signed and unsigned on eitheron_true
andon_false
- Support more integer dtypes in Series #824Explorer.Series.subtract/2
mixing signed and unsigned - Support more integer dtypes in Series #824Explorer.Series.pow/2
with{:u, size}
is casted to{:s, 64}
. Could keep the dtype - Fix mismatched types inSeries.pow
#821Shape
Explorer.Series.argsort/2
could return a{:u, size}
series instead of{:s, size}
- Support more integer dtypes in Series #824Explorer.Series.concat/2
mixing signed and unsigned integers should return signed integer - Series.concat handle multiple integer, float and null types #812Others
Explorer.Series.slice/2
- Remove unnecessary casts and other fixes #825Explorer.Series.argsort/2
- Remove unnecessary casts and other fixes #825Explorer.Series.count/1
- Remove unnecessary casts and other fixes #825Explorer.Series.nil_count/1
- Remove unnecessary casts and other fixes #825Explorer.Series.n_distinct/1
- Remove unnecessary casts and other fixes #825Explorer.Series.argmin/1
- Remove unnecessary casts and other fixes #825Explorer.Series.argmax/1
- Remove unnecessary casts and other fixes #825Explorer.Series.lengths/1
- Remove unnecessary casts and other fixes #825Date & Time related
Explorer.Series.second/1
- Remove unnecessary casts and other fixes #825Explorer.Series.minute/1
- Remove unnecessary casts and other fixes #825Explorer.Series.second/1
- Remove unnecessary casts and other fixes #825Explorer.Series.hour/1
- Remove unnecessary casts and other fixes #825Explorer.Series.day_of_week/1
- Remove unnecessary casts and other fixes #825Explorer.Series.day_of_year/1
- Remove unnecessary casts and other fixes #825Explorer.Series.month/1
- Remove unnecessary casts and other fixes #825Explorer.Series.year/1
- Remove unnecessary casts and other fixes #825Explorer.Series.frequencies/1
- Remove unnecessary casts and other fixes #825Dataframe
Explorer.DataFrame.slice/2
- Remove unnecessary casts and other fixes #825Explorer.DataFrame.concat_rows/1
The list of tasks is now tiny, but I should expand that with time.
The text was updated successfully, but these errors were encountered: