Skip to content

Only use necessary dims when creating temporary dataarray - #9206

Merged
Illviljan merged 8 commits into
pydata:mainfrom
Illviljan:slow_scatter
Jul 9, 2024
Merged

Only use necessary dims when creating temporary dataarray#9206
Illviljan merged 8 commits into
pydata:mainfrom
Illviljan:slow_scatter

Conversation

@Illviljan

@IllviljanIllviljan commented Jul 4, 2024

Copy link
Copy Markdown
Contributor

@Illviljan
Illviljan marked this pull request as ready for review July 5, 2024 17:35
@IllviljanIllviljan reopened this Jul 5, 2024
Comment threadxarray/plot/dataset_plot.py Outdated
# Base coords:
coords = dict(ds.coords)
coords = dict(ds[y].coords)
dims = dict.fromkeys(ds[y].dims)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you don't use the values anyway, why not use a set instead?

@IllviljanIllviljanJul 6, 2024

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Will look even nicer when ds.dims returns a set.
xref: #8496

@IllviljanIllviljan added the plan to merge Final call for comments label Jul 6, 2024
@Illviljan
Illviljan merged commit 3024655 into pydata:mainJul 9, 2024
dcherian added a commit to dcherian/xarray that referenced this pull request Jul 11, 2024
* main:
exclude the bots from the release notes (pydata#9235)
switch the documentation to run with `numpy>=2` (pydata#9177)
`numpy` 2 compatibility in the iris code paths (pydata#9156)
`numpy` 2 compatibility in the `netcdf4` and `h5netcdf` backends (pydata#9136)
Fix time indexing regression in `convert_calendar` (pydata#9192)
Use duckarray assertions in test_coding_times (pydata#9226)
Use reshape and ravel from duck_array_ops in coding/times.py (pydata#9225)
Cleanup test_coding_times.py (pydata#9223)
Only use necessary dims when creating temporary dataarray (pydata#9206)
Fix two bugs in DataTree.update() (pydata#9214)
Use numpy 2.0-compat `np.complex64` dtype in test (pydata#9217)
@Illviljan
Illviljan deleted the slow_scatter branch July 11, 2024 22:22
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plan to mergeFinal call for commentstopic-plotting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

scatter plot is slow

2 participants

@Illviljan@headtr1ck