2-9 of 1,200 results
Open links in new tab
  1. argparse — Parser for command-line options, arguments and ...

    Source code: Lib/argparse.py Tutorial: This page contains the API reference information. For a more gentle introduction to Python command-line parsing, have a look at the argparse tutorial. The arg...

  2. Indexing on ndarrays — NumPy v2.4 Manual

    As in Python, all indices are zero-based: for the i -th index n i, the valid range is 0 ≤ n i <d i where d i is the i -th element of the shape of the array. Negative indices are interpreted as counting from the end …

  3. Array creation — NumPy v2.4 Manual

    Introduction # There are 6 general mechanisms for creating arrays: Conversion from other Python structures (i.e. lists and tuples) Intrinsic NumPy array creation functions (e.g. arange, ones, zeros, …

  4. typing — Support for type hints — Python 3.14.3 documentation

    Source code: Lib/typing.py This module provides runtime support for type hints. Consider the function below: The function surface_area_of_cube takes an argument expected to be an instance of float,...

  5. Python NumPy: How to Add a New Value to a NumPy Array in ...

    Unlike standard Python lists where you can simply call .append(), NumPy arrays have a fixed size once created. Adding elements requires creating a new array that includes the additional values. NumPy …

  6. Sorting Techniques — Python 3.14.3 documentation

    Python lists have a built-in list.sort() method that modifies the list in-place. There is also a sorted() built-in function that builds a new sorted list from an iterable. In this document, we explore the various …

  7. numpy.array — NumPy v2.4 Manual

    numpy.array # numpy.array(object, dtype=None, *, copy=True, order='K', subok=False, ndmin=0, ndmax=0, like=None) # Create an array. Parameters: objectarray_like An array, any object exposing …

  8. dataclasses — Data Classes — Python 3.14.3 documentation

    Source code: Lib/dataclasses.py This module provides a decorator and functions for automatically adding generated special methods such as__init__() and__repr__() to user-defined classes. It was ori...