Skip to content

MAINT: Audit usage of cython memoryviews, add const to allow readonly arrays #20196

@ev-br

Description

@ev-br

Starting from Cython >=3.0.8, readonly fused typed memoryviews are finally allowed. Meaning we can add const qualifiers to memoryviews so that readonly arrays do not get rejected. We should audit our usage of memoryviews with fused dtypes and sprinkle const pretty much everywhere.
#20195 gives a representative example.

EDIT: a good way to go about this is one PR per submodule, using a grep like in #20196 (comment) to identify files to audit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CythonIssues with the internal Cython code basemaintenanceItems related to regular maintenance taskstaskA straightforward change, verification or fix.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions