Skip to main content
Ctrl+K
Logo image Logo image

Site Navigation

  • User Guide
  • API reference
  • Development
  • Release notes
  • Learn
dev2.2 (stable)2.12.01.261.251.241.231.221.211.201.191.181.171.161.151.141.13

Site Navigation

  • User Guide
  • API reference
  • Development
  • Release notes
  • Learn

Section Navigation

  • Array objects
  • Array API Standard Compatibility
  • Constants
  • Universal functions (ufunc)
  • Routines
    • Array creation routines
    • Array manipulation routines
    • Binary operations
    • String operations
    • C-Types foreign function interface (numpy.ctypeslib)
    • Datetime support functions
    • Data type routines
    • Mathematical functions with automatic domain
    • Floating point error handling
    • Discrete Fourier Transform (numpy.fft)
    • Functional programming
    • NumPy-specific help functions
    • Input and output
    • Linear algebra (numpy.linalg)
    • Logic functions
    • Masked array operations
    • Mathematical functions
    • Matrix library (numpy.matlib)
    • Miscellaneous routines
    • Padding Arrays
    • 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)
    • Support for testing overrides (numpy.testing.overrides)
    • Window functions
  • Typing (numpy.typing)
  • Global state
  • Packaging (numpy.distutils)
  • NumPy distutils - users guide
  • Status of numpy.distutils and migration advice
  • NumPy C-API
  • CPU/SIMD Optimizations
  • NumPy security
  • NumPy and SWIG
  • NumPy reference
  • Legacy Random Generation
  • numpy.random.ranf

numpy.random.ranf#

random.ranf()#

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-2022, NumPy Developers.

Created using Sphinx 6.2.1.

Built with the PyData Sphinx Theme 0.13.3.