Skip to content

fix: xumpy.random() honors dtype now#412

Merged
FlorianDeconinck merged 1 commit into
NOAA-GFDL:developfrom
romanc:romanc/xumpy-alloc-random
Mar 31, 2026
Merged

fix: xumpy.random() honors dtype now#412
FlorianDeconinck merged 1 commit into
NOAA-GFDL:developfrom
romanc:romanc/xumpy-alloc-random

Conversation

@romanc
Copy link
Copy Markdown
Collaborator

@romanc romanc commented Mar 31, 2026

Description

xumpy.random() didn't look at the dtype that could be provided. The new version of the function uses numpy/cupy the default random number generator, which has support for setting the dtype, though limited to float32/float64.

How has this been tested?

Extended existing test coverage.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas: N/A
  • I have made corresponding changes to the documentation (e.g. add new modules to docs/docstrings/): N/A
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules: N/A
  • New check tests, if applicable, are included

@romanc romanc requested a review from FlorianDeconinck March 31, 2026 14:32
@romanc romanc changed the title fix: xumpy.random honors dtype now fix: xumpy.random() honors dtype now Mar 31, 2026
Copy link
Copy Markdown
Collaborator

@FlorianDeconinck FlorianDeconinck left a comment

Choose a reason for hiding this comment

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

Good catch

@FlorianDeconinck FlorianDeconinck added this pull request to the merge queue Mar 31, 2026
Merged via the queue into NOAA-GFDL:develop with commit 4f5315e Mar 31, 2026
7 checks passed
@romanc romanc deleted the romanc/xumpy-alloc-random branch April 1, 2026 06:46
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