This series of tutorials helps you learn the basics of NumPy through beginner-friendly articles and well-explained code examples.
- 1How to Install NumPy and Set Up Your Development Environment
- 2Numpy Array vs Python List: What’s the Difference?
- 3How to Create and Manipulate NumPy Arrays
- 4How to Perform Basic Arithmetic Operations with NumPy
- 5How to Use NumPy for Simple Statistical Analysis
- 6How to Index and Slice NumPy Arrays
- 7How to Reshape NumPy Arrays (multiple approaches)
- 8How to Convert Python Lists to NumPy Arrays and Vice Versa
- 9How to Use NumPy’s Basic Mathematical Functions
- 10How to Handle Missing Data in NumPy Arrays
- 11How to Use Boolean Indexing in NumPy
- 12How to Sort Arrays in NumPy (Basic & Advanced Techniques)
- 13How to Use NumPy for Random Number Generation
- 14How to Read and Write Array Data to Files with NumPy
- 15How to Use NumPy’s arange, linspace, and logspace Functions
- 16How to Work with Multidimensional Arrays in NumPy
- 17How to Use NumPy’s Aggregate Functions (sum, min, max, mean)
- 18How to Visualize Data with Matplotlib and NumPy
- 19How to Use Conditional Statements with NumPy Arrays
- 20How to Perform Set Operations with NumPy Arrays
- 21How to Use NumPy’s Broadcasting Feature for Array Operations
- 22How to Use NumPy’s datetime64 and timedelta64 Data Types
- 23How to Efficiently Iterate Over NumPy Arrays
- 24How to Use Basic Linear Algebra Functions in NumPy
- 25How to Use NumPy for Descriptive Statistics
- 26How to Handle Numerical Precision and Rounding in NumPy
- 27How to Work with Complex Numbers in NumPy
- 28How to Use NumPy for Basic Image Manipulation
- 29How to Combine, Stack, and Split Arrays in NumPy
- 30How to Use NumPy’s genfromtxt and savetxt for Data Import/Export
- 31How to gracefully handle exceptions when working with NumPy
- 32How to benchmark your NumPy arrays and operations
- 33NumPy: How to concatenate arrays vertically and horizontally
- 34NumPy: How to Join Arrays (column-wise & row-wise)
- 35NumPy: How to Split an Array Vertically (row-wise)
- 36NumPy: How to Split an Array Horizontally (column-wise)
- 37NumPy: How to Filter an Array Based on an Array of Booleans
- 38NumPy: How to Filter an Array by a Condition
- 39NumPy trunc() and fix(): How to Round Down an Array of Numbers
- 40NumPy power(), mod(), and remainder(): How to Perform Fast Element-Wise Array Operations
- 41Working with NumPy log2(), log10(), and log() functions
- 423 Ways to Find Sum of Array Elements in NumPy
- 433 Ways to Find Product of Array Elements in NumPy
- 44NumPy: Transform Cartesian Product of Arrays x and y into a Single 2D Points Array
- 45NumPy: How to find unique elements in an array
- 46NumPy: How to find unique rows/columns of a 2D array
- 47NumPy: Generate all possible permutations of a given array
- 48NumPy: Find all possible combinations of two arrays
- 49NumPy: How to calculate Euclidean and Manhattan distances
- 50NumPy: How to find the row indexes of several values in a 2D array
- 51How to pretty print a NumPy array by suppressing the scientific notation (like 1e10)
- 52NumPy: How to get indices of N smallest/largest array elements
- 53Using np.einsum() to avoid explicit loops in NumPy
- 54How to find closest value in NumPy array
- 55How to use logical ‘and’ and ‘or’ operators with NumPy arrays
- 56NumPy apply() function: Explained with examples
- 57How to count elements/rows/columns of a NumPy ndarray
- 58NumPy: How to group by unique values in an array
- 59How to transpose a NumPy array (1D, 2D, and 3D)
- 60How to save a NumPy array to a CSV file
- 61How to Split an Array into N Random Sub-arrays in NumPy
- 62How to Save a NumPy Array as an Image File
- 63NumPy: How to insert a row/column into a 2D array
- 64NumPy: How to find common values between two arrays
- 65NumPy Random Seed: Explained with examples
- 66NumPy: Random selection with custom probabilities
- 675 Ways to Compare Two NumPy Arrays (with Examples)
- 68NumPy: How to Flatten a 2D Matrix to 1D Array in Row-Major Order
- 69NumPy: How to replace negative numbers in an array with zero
- 70NumPy: Replacing all array elements that satisfy condition
- 71How to check if a NumPy array contains a row/sub-array
- 72NumPy: Using np.newaxis and np.expand_dims to increase dimensions of array
- 73NumPy: How to store multiple data types in an array
- 74How to turn a nested Python list of lists into a NumPy 2D array
- 75What are scalar and vector in NumPy? (5 examples)
- 76Understanding numpy.int16 and numpy.uint16 types (6 examples)
- 77Exploring numpy.int32 and numpy.uint32 types (4 examples)
- 78Explaining numpy.int64 and numpy.uint64 types (5 examples)
- 79Explaining numpy.intp and numpy.uintp types (5 examples)
- 80Understanding numpy.float16 type (4 examples)
- 81Explaining numpy.float32 type (4 examples)
- 82Understanding numpy.float64 type (5 examples)
- 83Understanding numpy.float96 and numpy.float128 types (4 examples)
- 84Understanding numpy.complex64 and numpy.complex128 types (5 examples)
- 85Explaining numpy.complex192 and numpy.complex256 types (6 examples)
- 86Understanding ndarray.flags attribute in NumPy (5 examples)
- 87Understanding ndarray.strides attribute in NumPy (5 examples)
- 88Understanding ndarray.shape and ndarray.size attributes in NumPy (6 examples)
- 89NumPy – Understanding ndarray.data attribute (3 examples)
- 90NumPy – Understanding ndarray.itemsize attribute (4 examples)
- 91NumPy ndarray.nbytes attribute (5 examples)
- 92NumPy ndarray.base attribute (6 examples)
- 93A detailed guide to ndarray.dtype attribute in NumPy (5 examples)
- 94Using numpy.add() function (6 examples)
- 95Understanding numpy.subtract() function (5 examples)
- 96Working with numpy.multiply() function (4 examples)
- 97A detailed guide to numpy.matmul() function (4 examples)
- 98Using numpy.divide() function (4 examples)
- 99Understanding numpy.logaddexp() function (5 examples)
- 100Using numpy.logaddexp2() function (3 examples)
- 101Using numpy.true_divide() function (4 examples)
- 102Understanding numpy.floor_divide() function (5 examples)
- 103Using numpy.negative() function (4 examples)
- 104NumPy – Using power() and float_power() functions (4 examples)
- 105Using numpy.remainder() function (5 examples)
- 106Using mod(), fmod(), and divmod() functions in NumPy (6 examples)
- 107Working with numpy.fabs() function (5 examples)
- 108Using numpy.rint() function (4 examples)
- 109Exploring numpy.sign() function (5 examples)
- 110Explaining numpy.heaviside() function (4 examples)
- 111NumPy – Using conj() and conjugate() functions (4 examples)
- 112NumPy – Using exp() and exp2() functions (4 examples)
- 113Using numpy.log() function (5 examples)
- 114NumPy – Using log2() and log10() functions (4 examples)
- 115Using numpy.expm1() function (5 examples)
- 116Utilizing numpy.sqrt() function (4 examples)
- 117Working with numpy.square() function (5 examples)
- 118Using numpy.cbrt() function (4 examples)
- 119Using numpy.reciprocal() function (3 examples)
- 120NumPy – Using np.gcd() function (5 examples)
- 121NumPy – Using np.sin() and np.arcsin() functions (4 examples)
- 122NumPy: Using np.cos() and np.arccos() functions (5 examples)
- 123NumPy – Understanding tan(), arctan(), and arctan2() functions (6 examples)
- 124Understanding numpy.hypot() function (5 examples)
- 125NumPy – Using np.sinh() and np.arcsinh() functions (4 examples)
- 126NumPy – Explaining np.cosh() and np.arccosh() functions (4 examples)
- 127How to use numpy.tanh() and numpy.arctanh() functions (4 examples)
- 128Understanding numpy.degrees() function (4 examples)
- 129Working with numpy.radians() function (5 examples)
- 130Understanding numpy.deg2rad() and numpy.rad2deg() functions (4 examples)
- 131Understanding numpy.bitwise_and() function (4 examples)
- 132Using char.endswith() in NumPy (4 examples)
- 133Using numpy.bitwise_or() function (3 examples)
- 134Exploring numpy.bitwise_xor() function (4 examples)
- 135Using numpy.invert() function (5 examples)
- 136Understanding numpy.left_shift() function (4 examples)
- 137Exploring numpy.right_shift() function (5 examples)
- 138NumPy – Using greater() and greater_equal() functions (4 examples)
- 139NumPy – Using less() and less_equal() functions (5 examples)
- 140NumPy: Using equal() and not_equal() functions (4 examples)
- 141Understanding numpy.logical_and() function (5 examples)
- 142Explaining numpy.logical_or() function (4 examples)
- 143Using numpy.logical_xor() function (5 examples)
- 144Using numpy.logical_not() function (4 examples)
- 145NumPy – Using maximum() and fmax() functions (4 examples)
- 146NumPy: Utilizing minimum() and fmin() functions (4 examples)
- 147Using numpy.isfinite() function (4 examples)
- 148Using numpy.isinf() function (3 examples)
- 149Understanding NumPy isnan() function (4 examples)
- 150Using numpy.isnat() function (5 examples)
- 151Using NumPy signbit() function (4 examples)
- 152Understanding numpy.copysign() function (5 examples)
- 153Using numpy.nextafter() function (4 examples)
- 154Explaining numpy.spacing() function (5 examples)
- 155Working with NumPy modf() function (4 examples)
- 156How to use numpy.ldexp() function (5 examples)
- 157Using numpy.frexp() function (4 examples)
- 158Using numpy.floor() function (3 examples)
- 159Understanding numpy.ceil() function (4 examples)
- 160Working with numpy.trunc() function (7 examples)
- 161NumPy – Understanding ndarray.T attribute (3 examples)
- 162NumPy – Using ndarray.real attribute (4 examples)
- 163NumPy – How to get the imaginary part of an array (4 examples)
- 164NumPy – Using ndarray.flat attribute (5 examples)
- 165NumPy ndarray.item() method (4 examples)
- 166Using ndarray.tolist() method in NumPy (5 examples)
- 167Using ndarray.tostring() method in NumPy (4 examples)
- 168Understanding ndarray.itemset() method in NumPy (3 examples)
- 169NumPy: Using ndarray.tobytes() method (4 examples)
- 170Using ndarray.tofile() method in NumPy (with examples)
- 171NumPy: How to use ndarray.dump() method (3 examples)
- 172NumPy – Using ndarray.dumps() method (4 examples)
- 173NumPy: 4 ways to disable future/depreciated warnings
- 174NumPy – Using ndarray.astype() method to change data type (5 examples)
- 175Understanding numpy.absolute() function (4 examples)
- 176NumPy – Using ndarray.byteswap() method (4 examples)
- 177Using ndarray.copy() method in NumPy (5 examples)
- 178NumPy – Using ndarray.view() method (4 examples)
- 179Explore ndarray.getfield() method in NumPy (5 examples)
- 180Using ndarray.setflags() method in NumPy (4 examples)
- 181Understanding ndarray.fill() method in NumPy (6 examples)
- 182NumPy – A detailed guide to ndarray.reshape() method (4 examples)
- 183Using ndarray.resize() method in NumPy (5 examples)
- 184NumPy – Understanding ndarray.transpose() method through examples (4 examples)
- 185Using ndarray.swapaxes() method in NumPy (3 examples)
- 186Mastering NumPy ndarray.flatten() method (5 examples)
- 187NumPy ndarray.ravel() method: Explained with examples (4 examples)
- 188Using ndarray.squeeze() method in NumPy (4 examples)
- 189NumPy ndarray.take() method (5 examples)
- 190NumPy – Using ndarray.repeat() method (4 examples)
- 191NumPy – Working with ndarray.put() method (6 examples)
- 192Using ndarray.choose() method in NumPy (5 examples)
- 193Mastering ndarray.sort() method in NumPy (5 examples)
- 194Mastering ndarray.argsort() method in NumPy (4 examples)
- 195Using ndarray.partition() method in NumPy (4 examples)
- 196NumPy – Understanding ndarray.argpartition() method (4 examples)
- 197Using ndarray.searchsorted() method in NumPy (5 examples)
- 198Using np.lcm() function in NumPy (4 examples)
- 199Using ndarray.nonzero() method in NumPy (4 examples)
- 200Understanding ndarray.compress() method in NumPy (5 examples)
- 201Using ndarray.diagonal() method in NumPy (3 examples)
- 202Utilizing ndarray.max() method in NumPy (4 examples)
- 203Using ndarray.min() method in NumPy (5 examples)
- 204Understanding ndarray.argmin() method in NumPy (3 examples)
- 205Working with ndarray.argmax() method in NumPy (4 examples)
- 206NumPy – Using ndarray.ptp() method (5 examples)
- 207NumPy: Using ndarray.clip() method (4 examples)
- 208NumPy: Understanding ndarray.conj() method (5 examples)
- 209Using ndarray.round() method in NumPy (4 examples)
- 210NumPy – Using ndarray.trace() method (5 examples)
- 211Using ndarray.sum() method in NumPy (6 examples)
- 212Understanding ndarray.cumsum() method in NumPy (5 examples)
- 213NumPy – Using ndarray.mean() method (4 examples)
- 214NumPy – Using ndarray.var() method (5 examples)
- 215NumPy – Understanding ndarray.std() method (4 examples)
- 216NumPy: Using ndarray.prod() method (5 examples)
- 217How to use ndarray.cumprod() method in NumPy (4 examples)
- 218Understanding ndarray.all() method in NumPy (5 examples)
- 219Exploring ndarray.any() method in NumPy (4 examples)
- 220Understanding numpy.mat() function (5 examples)
- 221Using numpy.asmatrix() function (4 examples)
- 222Using numpy.bmat() function (5 examples)
- 223Using NumPy matlib.empty() function (4 examples)
- 224Using NumPy matlib.zeros() function (5 examples)
- 225NumPy matlib.ones() function (4 examples)
- 226Using matlib.eye() function in NumPy (5 examples)
- 227Exploring matlib.identity() function in NumPy (4 examples)
- 228Exploring matlib.repeat() function in NumPy (5 examples)
- 229NumPy matlib.rand() function (4 examples)
- 230NumPy – Using matlib.randn() function (4 examples)
- 231NumPy – Using random.Generator.choice() method (5 examples)
- 232NumPy: How to Generate Random Bytes (4 Examples)
- 233NumPy – Understanding random.Generator.random() method (5 examples)
- 234NumPy – Using random Generator.shuffle() method (4 examples)
- 235Using NumPy random Generator.permutation() method (5 examples)
- 236NumPy – Using random Generator.permuted() method (4 examples)
- 237NumPy: How to draw samples from a Beta distribution (3 examples)
- 238NumPy random Generator.binomial() method (4 examples)
- 239Using NumPy random Generator.chisquare() method (5 examples)
- 240NumPy: Drawing samples from the Dirichlet distribution (4 examples)
- 241NumPy: How to draw samples from an exponential distribution (4 examples)
- 242NumPy: Getting samples from an F distribution (3 examples)
- 243NumPy – Draw samples from a Gamma distribution (4 examples)
- 244NumPy: Getting samples from geometric distribution (4 examples)
- 245Using NumPy random Generator.gumbel() method (4 examples)
- 246NumPy: How to get samples from a Hypergeometric distribution (3 examples)
- 247NumPy random Generator.laplace() method (4 examples)
- 248NumPy random.Generator.logistic() method (5 examples)
- 249NumPy – Using random Generator.lognormal() method (4 examples)
- 250NumPy – Understanding random Generator.logseries() method (5 examples)
- 251NumPy: Getting samples from a multinomial distribution (4 examples)
- 252NumPy: Generate variates from a multivariate hypergeometric distribution (3 examples)
- 253NumPy: Get random samples from a multivariate normal distribution (3 examples)
- 254NumPy: Get samples from a negative binomial distribution (4 examples)
- 255NumPy: Getting samples from a noncentral chi-square distribution (5 examples)
- 256NumPy: Drawing samples from the noncentral F distribution (3 examples)
- 257NumPy – Using random.Generator.normal() method (4 examples)
- 258NumPy – Using random.Generator.pareto() method (5 examples)
- 259NumPy: Understanding random.Generator.poisson() method (4 examples)
- 260NumPy – Using random.Generator.power() method (4 examples)
- 261NumPy – Using random.Generator.rayleigh() method (4 examples)
- 262NumPy random.Generator.standard_cauchy() method (3 examples)
- 263NumPy random.Generator.standard_exponential() method (6 examples)
- 264Using random.Generator.standard_gamma() method in NumPy (5 examples)
- 265Using random.Generator.standard_normal() method in NumPy (4 examples)
- 266NumPy – Using random.Generator.standard_t() method (4 examples)
- 267NumPy – Using random.Generator.triangular() method (5 examples)
- 268NumPy – Understanding random.Generator.uniform() method (5 examples)
- 269Using random.Generator.vonmises() method in NumPy (5 examples)
- 270Understanding random.Generator.wald() method in NumPy (4 examples)
- 271NumPy – Using random.Generator.weibull() method (5 examples)
- 272Using numpy.can_cast() function (8 examples)
- 273Explaining numpy.promote_types() function (5 examples)
- 274Understanding NumPy ufunc.reduce() method (4 examples)
- 275NumPy – Exploring ufunc.accumulate() method (5 examples)
- 276NumPy – How to use ufunc.reduceat() method (4 examples)
- 277Using ufunc.outer() method in NumPy (5 examples)
- 278Working with ufunc.at() method in NumPy (4 examples)
- 279NumPy – Understanding ufunc.nin and ufunc.nout attributes (5 examples)
- 280NumPy – Using ufunc.nargs attribute (4 examples)
- 281NumPy – Making use of ufunc.ntypes attribute (5 examples)
- 282NumPy – What is ufuc.types attribute? (4 examples)
- 283NumPy – Using ufunc.identity attribute (5 examples)
- 284NumPy ufunc.signature attribute: Explained with examples