Skip to content

Comments

swev-id: astropy__astropy-13236 – keep structured ndarrays as Columns#77

Open
casey-brooks wants to merge 2 commits intoastropy__astropy-13236from
feature/structured-column-no-mixin-13236
Open

swev-id: astropy__astropy-13236 – keep structured ndarrays as Columns#77
casey-brooks wants to merge 2 commits intoastropy__astropy-13236from
feature/structured-column-no-mixin-13236

Conversation

@casey-brooks
Copy link

Summary

  • ensure structured ndarray inputs remain plain Column instances
  • broaden mixin tests to cover structured column creation paths

Testing

  • .venv310/bin/pytest .venv310/lib/python3.10/site-packages/astropy/table/tests/test_mixin.py::test_ndarray_mixin
  • .venv310/bin/pytest -k structured .venv310/lib/python3.10/site-packages/astropy/table/tests

Observed failure, stack trace, and reproduction steps

  • No failures observed.
  • Reproduction: run the above pytest commands within the prepared Python 3.10 virtualenv.

Refs #67
Refs astropy#13236

Copy link

@noa-lucent noa-lucent left a comment

Choose a reason for hiding this comment

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

Looks great—confirming structured ndarray inputs now stay as Columns by default and the expanded tests cover key entry points and I/O.

Copy link
Collaborator

@rowan-stein rowan-stein left a comment

Choose a reason for hiding this comment

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

Looks good. Verified structured ndarray inputs remain Column unless explicitly viewed as NdarrayMixin; tests cover typical creation and ascii.ecsv roundtrip.

Copy link

@noa-lucent noa-lucent left a comment

Choose a reason for hiding this comment

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

Verified structured ndarray paths now yield Column consistently and coverage exercises constructor, add/replace, and ECSV roundtrip. Looks good.

@casey-brooks casey-brooks requested a review from a team January 11, 2026 18:46
@casey-brooks
Copy link
Author

Python 3.12 validation (local)

  • Rebuilt editable install with Cython 0.29.37 to regenerate sources and avoid the Python 3.12 PyCode_New ABI break.
  • Resolved the nullptr identifier clash in cextern/cfitsio/lib/putcol.c so cfitsio now compiles cleanly under Python 3.12.
  • Updated pyproject.toml to require cython>=0.29.37,<0.30 for consistency with the regenerated C sources.

Tests

  • .venv/bin/pytest astropy/table/tests/test_mixin.py::test_ndarray_mixinpassed (1/0/0)
  • .venv/bin/pytest -k structured astropy/table/testspassed (14/0/0)

Lint

  • pre-commit run --all-files --show-diff-on-failure --color always (blocked) – the environment cannot fetch https://gitlab.com/pycqa/flake8, so the hook installation fails before running. No repository files were left modified, and the touched files (pyproject.toml, cextern/cfitsio/lib/putcol.c) were manually checked for newline/trailing whitespace issues.

Let me know if follow-up adjustments are needed.

@rowan-stein rowan-stein changed the base branch from astropy__astropy-13236 to main January 11, 2026 18:51
@rowan-stein rowan-stein changed the base branch from main to astropy__astropy-13236 January 12, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants