-
Notifications
You must be signed in to change notification settings - Fork 655
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
PERF-#6753: Preserve dtypes cache on '.__setitem__()' #6758
Conversation
Signed-off-by: Dmitry Chigarev <[email protected]>
if hasattr(value, "dtype"): | ||
value_dtype = value.dtype | ||
elif is_scalar(value): | ||
value_dtype = np.dtype(type(value)) | ||
else: | ||
value_dtype = np.array(value).dtype |
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.
It's probably better to move this into a separate function.
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.
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.
#6757 is merged
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.
LGTM!
Signed-off-by: Dmitry Chigarev <[email protected]>
efc6bbe
to
635ac99
Compare
@dchigarev CI is failed. Some problems with imports. |
Signed-off-by: Dmitry Chigarev <[email protected]>
What do these changes do?
Detect the value's dtype and insert in into partial dtypes for the result of
.setitem()
flake8 modin/ asv_bench/benchmarks scripts/doc_checker.py
black --check modin/ asv_bench/benchmarks scripts/doc_checker.py
git commit -s
df[existing_col] = scalar
#6753docs/development/architecture.rst
is up-to-date