Skip to content

Remove Argument.view_dtype property#245

Merged
avalentino merged 1 commit intoliberfa:mainfrom
eerovaher:rm-Argument-view_dtype
May 8, 2026
Merged

Remove Argument.view_dtype property#245
avalentino merged 1 commit intoliberfa:mainfrom
eerovaher:rm-Argument-view_dtype

Conversation

@eerovaher
Copy link
Copy Markdown
Contributor

In practice the property has one possible value, so it is simpler to hardcode that value in the core.py template.

The full difference between the files generated by erfa_generator in current main and this PR is

130d129
< dt_bytes12 = np.dtype('S12')

Comment thread erfa_generator.py
Comment on lines -187 to -188
if self.ctype == 'const char':
return 'dt_bytes12'
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Apparently self.ctype is never "const char".

In practice the property had only one possible value, so it is simpler
to hardcode that value where it is used.
@eerovaher eerovaher force-pushed the rm-Argument-view_dtype branch from 616a116 to a7f4084 Compare May 8, 2026 17:44
@avalentino avalentino merged commit b06be2b into liberfa:main May 8, 2026
28 checks passed
@eerovaher eerovaher deleted the rm-Argument-view_dtype branch May 8, 2026 20:50
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.

2 participants