Skip to content

The Recommended Random Number Generation In NumPy #19670

Closed
@ArnuldOnData

Description

@ArnuldOnData

Problem

Matplotlib documentation still uses old method of random number generation in NumPy. I think we can update the code to use newer method. Newer method was intropduced in NumPy 1.17 and recommended by NumPy over the older method (even though the older method still works)

Suggested Improvement

  • We can change the code to shown in this GitHub gist
  • Entire documenation regarding recommended method is in NumPy docs
  • Here is a visualization/output from the code in gist above:

matplotlib-numpy-random

Matplotlib version

  • Operating system: Arch Linux
  • Matplotlib version: 3.3.4 (matplotlib.version)
  • Python version: 3.9.2 (platform.python_version())
  • Matplotlib documentation version: Doc version v3.3.4 (as seen at the bottom of the histogram page )

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationGood first issueOpen a pull request against these issues if there are no active ones!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions