Skip to content

[Improvement] Add an annotation for contiguous/non-contiguous arrays #2559

Description

@EmilyBourne

What would you like to be improved?

Currently arrays are assumed to be non-contiguous. This has a performance impact. It would be nice to be able to indicate when arrays are contiguous or non-contiguous to leverage this knowledge to enable vectorisation.

Do you have any suggestions for improvement? (Optional)

In Python contiguous arrays could be denoted int[:] while non-contiguous arrays would be denoted int[::].
It is not clear how this could be implemented within the deprecation cycle. One possibility is to have a flag to activate future behaviour and raise a deprecation warning if the flag is not used.

In Fortran contiguous arrays should have contiguous in the type.

Errors must be raised if a non-contiguous array is used in a contiguous context (e.g. a slice along a non-contiguous dimension is passed).

Record

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions