Skip to content

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

Open
Sevans711 wants to merge 1 commit into
mainfrom
sevans/fix-healpix-node_lat-crash
Open

Fix TypeError from HEALPix grid.node_lat when not yet populated#1664
Sevans711 wants to merge 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
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

1 participant