Skip to content

Serialize all NumPy integer, float and bool scalars in json_serial - #2463

Closed
test-codeop wants to merge 2 commits into
geopython:masterfrom
test-codeop:uncover-agent-2608972350
Closed

test-codeop wants to merge 2 commits into
geopython:masterfrom
test-codeop:uncover-agent-2608972350

Conversation

@test-codeop

Copy link
Copy Markdown

json_serial only recognised int32, int64, float32 and float64 by type name, so other NumPy scalars that providers commonly return (e.g. uint8 or int16 nodata/fill values, float16 data, bool) raised "TypeError: ... not serializable". Match on NumPy's abstract integer and floating types (and bool) instead, still without importing NumPy.

Overview

Related Issue / discussion

Additional information

Dependency policy (RFC2)

  • I have ensured that this PR meets RFC2 requirements

Updates to public demo

Contributions and licensing

(as per https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md#contributions-and-licensing)

  • I'd like to contribute [feature X|bugfix Y|docs|something else] to pygeoapi. I confirm that my contributions to pygeoapi will be compatible with the pygeoapi license guidelines at the time of contribution

  • I have already previously agreed to the pygeoapi Contributions and Licensing Guidelines

  • Original PR: Serialize all NumPy integer, float and bool scalars in json_serial #2418

  • Reproduced automatically by test_create_pr.py to exercise the Detect AI workflow.

@github-actions github-actions Bot added the AI generated Label for the detect-ai workflow classifier label Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI generated Label for the detect-ai workflow classifier

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants