Version
v2026.07.0
How did you install UXarray?
Source
What happened?
Seven incidental bugs were found in scraping for performance issues. These line numbers are from the cmd/merge-OFE branch #1560, which will presumably be merged in soon.
| Done |
Site |
Bug |
|
grid/geometry.py:895, :904 |
_check_intersection returns True (abort signal) where siblings return an intersection count. Numba unifies to int64, so True → 1, and the parity test at :838 counts the abort as one intersection — flipping the pole-inside-polygon verdict. |
|
grid/utils.py:432, grid/bounds.py:429, :431 |
np.isclose(a, b, tol) — the third positional parameter is rtol, not atol. Intended 1e-8 absolute becomes ~1.57e-8 effective on every pole test. |
|
core/dataarray.py:1066 |
weighted_mean on non-face/non-edge data warns, leaves weights=None, then calls weights.sum() at :1076 → AttributeError instead of the documented unweighted mean. |
|
core/api.py:587, :595, :599 |
concat compares grids by id(), so two structurally identical grids that went through Grid.copy() are rejected; and it returns the loop variable uxgrid rather than ref_uxgrid. |
|
core/utils.py:59, :61, :63 |
dim_ordered is assigned inside a loop and consumed after it — last-match-wins, and NameError if no variable matches. |
|
core/dataset.py:756 |
sel re-wraps with the unsliced self.uxgrid, so a sel on a grid dim leaves the grid inconsistent (isel does slice it). |
|
grid/connectivity.py:547 |
_face_nodes_to_sparse_matrix is CSR-sorted by construction and test-covered (test/test_helpers.py:190) but has no production callers — the CSR builder this design wants, already sitting unused. Its non_filled_element_flags return is a wasted float64 all-ones array. |
What did you expect to happen?
Good things?
Can you provide a MCVE to repoduce the bug?
Version
v2026.07.0
How did you install UXarray?
Source
What happened?
Seven incidental bugs were found in scraping for performance issues. These line numbers are from the cmd/merge-OFE branch #1560, which will presumably be merged in soon.
grid/geometry.py:895,:904_check_intersectionreturnsTrue(abort signal) where siblings return an intersection count. Numba unifies to int64, soTrue→1, and the parity test at:838counts the abort as one intersection — flipping the pole-inside-polygon verdict.grid/utils.py:432,grid/bounds.py:429,:431np.isclose(a, b, tol)— the third positional parameter isrtol, notatol. Intended 1e-8 absolute becomes ~1.57e-8 effective on every pole test.core/dataarray.py:1066weighted_meanon non-face/non-edge data warns, leavesweights=None, then callsweights.sum()at:1076→AttributeErrorinstead of the documented unweighted mean.core/api.py:587,:595,:599concatcompares grids byid(), so two structurally identical grids that went throughGrid.copy()are rejected; and it returns the loop variableuxgridrather thanref_uxgrid.core/utils.py:59,:61,:63dim_orderedis assigned inside a loop and consumed after it — last-match-wins, andNameErrorif no variable matches.core/dataset.py:756selre-wraps with the unslicedself.uxgrid, so aselon a grid dim leaves the grid inconsistent (iseldoes slice it).grid/connectivity.py:547_face_nodes_to_sparse_matrixis CSR-sorted by construction and test-covered (test/test_helpers.py:190) but has no production callers — the CSR builder this design wants, already sitting unused. Itsnon_filled_element_flagsreturn is a wasted float64 all-ones array.What did you expect to happen?
Good things?
Can you provide a MCVE to repoduce the bug?
Multiple