Skip to content

DescriptorArray construction requires NumPy >= 2.1 (np.astype) while numpy is unpinned #276

@rozyczko

Description

@rozyczko

Finding V-M12 in DEEP_ANALYSIS.md (parent #261).

descriptor_array.py:66,77 uses the free function np.astype(value, 'float'), which exists only in NumPy >= 2.1. pyproject.toml leaves numpy unpinned, and older NumPy is common with pinned scipp stacks — there, constructing any DescriptorArray raises AttributeError: module 'numpy' has no attribute 'astype'.

Fix: use value.astype('float') (already the spelling elsewhere in the same file, e.g. line 215), and/or add a minimal numpy version floor in pyproject.toml.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions