Skip to main content
Ctrl+K
NumPy v2.4.dev0 Manual - Home NumPy v2.4.dev0 Manual - Home
  • User Guide
  • API reference
  • Building from source
  • Development
  • Release notes
  • Learn
    • NEPs
  • GitHub
  • User Guide
  • API reference
  • Building from source
  • Development
  • Release notes
  • Learn
  • NEPs
  • 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
    • Discrete Fourier Transform
    • Functional programming
    • Input and output
    • Indexing routines
    • Linear algebra
    • Logic functions
    • Masked array operations
    • Mathematical functions
    • Miscellaneous routines
    • Polynomials
    • Random sampling
      • 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
    • Window functions
  • Typing (numpy.typing)
  • Packaging
  • 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
  • Legacy random generation
  • numpy.random.sample

numpy.random.sample#

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

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

previous

numpy.random.rayleigh

next

numpy.random.seed

On this page
  • random.sample

© Copyright 2008-2025, NumPy Developers.

Created using Sphinx 7.2.6.

Built with the PyData Sphinx Theme 0.16.1.

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy