Skip to content

Fix TypeError from HEALPix grid.node_lat when not yet populated - #1664

Merged
rajeeja merged 1 commit into
mainfrom
sevans/fix-healpix-node_lat-crash
Aug 12, 2026
Merged

Fix TypeError from HEALPix grid.node_lat when not yet populated#1664
rajeeja merged 1 commit into
mainfrom
sevans/fix-healpix-node_lat-crash

Conversation

@Sevans711

Copy link
Copy Markdown
Collaborator

Closes #1637

Overview

Grid.node_lat was failing on any HEALPix grid when node_lat was not already been populated. For example, ux.Grid.from_healpix(zoom=2).node_lat was causing TypeError.

The fix here is exactly the one proposed in that issue:

Fix is _populate_healpix_boundaries(self._ds) at grid.py:1003.

Adds a regression test which would have failed before but now succeeds.

PR Checklist

General

  • An issue is created and linked
  • Added appropriate labels (if your uxarray repo permissions allow it)
  • Filled out Overview and Expected Usage (if applicable) sections

Testing & Benchmarking

  • [N/A] Adequate tests are created if there is new functionality
  • Tests are not too basic (such as simply calling a function and nothing else)
  • [N/A] Tests cover all major paths in your new functions
  • [N/A] If this PR could affect performance, ran ASV benchmarks and confirmed they show expected behavior (add a new benchmark if necessary)

AI Disclosure

AI Usage: just GitHub Copilot inline code suggestions.

  • I take responsibility for all AI-generated content in my PR.
  • I have tested all AI-generated content in my PR.

@Sevans711 Sevans711 added the bug Something isn't working label Aug 10, 2026
@Sevans711
Sevans711 requested a review from rajeeja August 10, 2026 20:22
@erogluorhan
erogluorhan self-requested a review August 12, 2026 19:21

@erogluorhan erogluorhan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me.

@rajeeja
rajeeja merged commit d8b6772 into main Aug 12, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HEALPix: Grid.node_lat raises TypeError: 'Grid' object does not support item assignment

3 participants