Skip to content

Random number generation for alternative backends which respects default dtype #2

Open

Description

@steppi

There were discussions here scipy/scipy#23765 around alternative backend testing for scipy.signal around ensuring that arrays intended as inputs to functions being tested respect the default dtype. One example that came up is input generated through numpy.random, which will always be float64 unless explicitly cast after generation. @lucascolley suggested submitting an issue in this repo (scipy/scipy#23765 (comment)) to see if something could be done on this side to avoid boiler plate in scipy tests that use numpy.random (e.g., always having to remember to call xp.asarray with dtype=xp_default_dtype(xp) whenever converting random arrays to xp arrays for use in alternative backend tests).

cc @ev-br

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions