-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DEPR: Enforce Series(float_with_nan, dtype=inty) #49605
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
Conversation
asv_bench/benchmarks/groupby.py
Outdated
|
||
def time_frame_transform(self, dtype, method): | ||
self.df.groupby("key").transform(method) | ||
|
||
def time_frame_transform_many_nulls(self, dtype, method): | ||
if dtype == "int64": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, this may cause the benchmark tracking to look odd with the prior benchmark having some finite time to then completing almost instantly.
Could this benchmark be wholly refactored like:
param_names = ["dtype", "method", "with_nans"]
params = [
["float64", "int64", "Float64", "Int64"],
["cummin", "cummax", "cumsum"],
[True, False]
]
def setup(self, dtype, method, with_nans):
vals = np.random.randint(-10, 10, (N, 5))
if with_nans
if dtype = "int64":
raise NotImplementedError
else:
vals = vals.astype(float, copy=True)
vals[::2, :] = np.nan
vals[::3, :] = np.nan
....
def time_frame_transform(self, dtype, method, with_nans):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
Thanks @jbrockmendel |
* DEPR: Enforce Series(float_with_nan, dtype=inty) * update asv * troubleshoot asv * suggested asv edit
* DEPR: Enforce Series(float_with_nan, dtype=inty) * update asv * troubleshoot asv * suggested asv edit
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.