Skip to main content
Ctrl+K
NumPy v2.2 Manual - Home NumPy v2.2 Manual - Home
  • User Guide
  • API reference
  • Building from source
  • Development
  • Release notes
  • Learn
    • NEPs
dev2.2 (stable)2.12.01.261.251.241.231.221.211.201.191.181.171.161.151.141.13
  • GitHub
  • User Guide
  • API reference
  • Building from source
  • Development
  • Release notes
  • Learn
  • NEPs
dev2.2 (stable)2.12.01.261.251.241.231.221.211.201.191.181.171.161.151.141.13
  • GitHub

Section Navigation

  • NumPy’s module structure
  • Array objects
  • Universal functions (ufunc)
  • Routines and objects by topic
    • Constants
    • Array creation routines
    • Array manipulation routines
    • Bit-wise operations
    • String functionality
    • Datetime support functions
    • Data type routines
    • Mathematical functions with automatic domain
    • Floating point error handling
    • Exceptions and Warnings (numpy.exceptions)
    • Discrete Fourier Transform (numpy.fft)
    • Functional programming
    • Input and output
    • Indexing routines
    • Linear algebra (numpy.linalg)
    • Logic functions
    • Masked array operations
    • Mathematical functions
    • Miscellaneous routines
    • Polynomials
    • Random sampling (numpy.random)
      • Random Generator
      • Legacy Generator (RandomState)
        • numpy.random.RandomState.get_state
        • numpy.random.RandomState.set_state
        • numpy.random.RandomState.seed
        • numpy.random.RandomState.rand
        • numpy.random.RandomState.randn
        • numpy.random.RandomState.randint
        • numpy.random.RandomState.random_integers
        • numpy.random.RandomState.random_sample
        • numpy.random.RandomState.choice
        • numpy.random.RandomState.bytes
        • numpy.random.RandomState.shuffle
        • numpy.random.RandomState.permutation
        • numpy.random.RandomState.beta
        • numpy.random.RandomState.binomial
        • numpy.random.RandomState.chisquare
        • numpy.random.RandomState.dirichlet
        • numpy.random.RandomState.exponential
        • numpy.random.RandomState.f
        • numpy.random.RandomState.gamma
        • numpy.random.RandomState.geometric
        • numpy.random.RandomState.gumbel
        • numpy.random.RandomState.hypergeometric
        • numpy.random.RandomState.laplace
        • numpy.random.RandomState.logistic
        • numpy.random.RandomState.lognormal
        • numpy.random.RandomState.logseries
        • numpy.random.RandomState.multinomial
        • numpy.random.RandomState.multivariate_normal
        • numpy.random.RandomState.negative_binomial
        • numpy.random.RandomState.noncentral_chisquare
        • numpy.random.RandomState.noncentral_f
        • numpy.random.RandomState.normal
        • numpy.random.RandomState.pareto
        • numpy.random.RandomState.poisson
        • numpy.random.RandomState.power
        • numpy.random.RandomState.rayleigh
        • numpy.random.RandomState.standard_cauchy
        • numpy.random.RandomState.standard_exponential
        • numpy.random.RandomState.standard_gamma
        • numpy.random.RandomState.standard_normal
        • numpy.random.RandomState.standard_t
        • numpy.random.RandomState.triangular
        • numpy.random.RandomState.uniform
        • numpy.random.RandomState.vonmises
        • numpy.random.RandomState.wald
        • numpy.random.RandomState.weibull
        • numpy.random.RandomState.zipf
        • numpy.random.beta
        • numpy.random.binomial
        • numpy.random.bytes
        • numpy.random.chisquare
        • numpy.random.choice
        • numpy.random.dirichlet
        • numpy.random.exponential
        • numpy.random.f
        • numpy.random.gamma
        • numpy.random.geometric
        • numpy.random.get_state
        • numpy.random.gumbel
        • numpy.random.hypergeometric
        • numpy.random.laplace
        • numpy.random.logistic
        • numpy.random.lognormal
        • numpy.random.logseries
        • numpy.random.multinomial
        • numpy.random.multivariate_normal
        • numpy.random.negative_binomial
        • numpy.random.noncentral_chisquare
        • numpy.random.noncentral_f
        • numpy.random.normal
        • numpy.random.pareto
        • numpy.random.permutation
        • numpy.random.poisson
        • numpy.random.power
        • numpy.random.rand
        • numpy.random.randint
        • numpy.random.randn
        • numpy.random.random
        • numpy.random.random_integers
        • numpy.random.random_sample
        • numpy.random.ranf
        • numpy.random.rayleigh
        • numpy.random.sample
        • numpy.random.seed
        • numpy.random.set_state
        • numpy.random.shuffle
        • numpy.random.standard_cauchy
        • numpy.random.standard_exponential
        • numpy.random.standard_gamma
        • numpy.random.standard_normal
        • numpy.random.standard_t
        • numpy.random.triangular
        • numpy.random.uniform
        • numpy.random.vonmises
        • numpy.random.wald
        • numpy.random.weibull
        • numpy.random.zipf
      • Bit generators
      • Upgrading PCG64 with PCG64DXSM
      • Compatibility policy
      • Parallel Applications
      • Multithreaded Generation
      • What’s new or different
      • Comparing Performance
      • C API for random
      • Examples of using Numba, Cython, CFFI
    • Set routines
    • Sorting, searching, and counting
    • Statistics
    • Test support (numpy.testing)
    • Window functions
  • Typing (numpy.typing)
  • Packaging (numpy.distutils)
  • NumPy C-API
  • Array API standard compatibility
  • CPU/SIMD optimizations
  • Thread Safety
  • Global Configuration Options
  • NumPy security
  • Status of numpy.distutils and migration advice
  • numpy.distutils user guide
  • NumPy and SWIG
  • NumPy reference
  • NumPy’s module structure
  • Random sampling (numpy.random)
  • Legacy random generation
  • numpy.random.ranf

numpy.random.ranf#

random.ranf(*args, **kwargs)#

This is an alias of random_sample. See random_sample for the complete documentation.

previous

numpy.random.random_sample

next

numpy.random.rayleigh

On this page
  • random.ranf

© Copyright 2008-2024, NumPy Developers.

Created using Sphinx 7.2.6.

Built with the PyData Sphinx Theme 0.16.0.