Skip to main content
Ctrl+K
Astropy
  • About
    • About Astropy
    • Code of Conduct
    • Acknowledging & Citing
    • History
  • Documentation
    • astropy
    • asdf-astropy
    • astropy-healpix
    • astroquery
    • ccdproc
    • photutils
    • regions
    • reproject
    • specreduce
    • specutils
  • Get Help
  • Contribute
  • Affiliated Packages
  • Team
  • GitHub
  • About ▾
    • About Astropy
    • Code of Conduct
    • Acknowledging & Citing
    • History
  • Documentation ▾
    • astropy
    • asdf-astropy
    • astropy-healpix
    • astroquery
    • ccdproc
    • photutils
    • regions
    • reproject
    • specreduce
    • specutils
  • Get Help
  • Contribute
  • Affiliated Packages
  • Team
  • GitHub
Logo image

Astropy v8.0.0b1

  • Getting Started
  • User Guide
    • Constants (astropy.constants)
    • Units and Quantities (astropy.units)
    • N-Dimensional Datasets (astropy.nddata)
    • Data Tables (astropy.table)
    • Time and Dates (astropy.time)
    • Time Series (astropy.timeseries)
    • Astronomical Coordinate Systems (astropy.coordinates)
    • World Coordinate System (astropy.wcs)
    • Models and Fitting (astropy.modeling)
    • Uncertainties and Distributions (astropy.uncertainty)
    • Overview of Astropy File I/O
    • High-level Unified File I/O
    • FITS File Handling (astropy.io.fits)
    • Text Tables (astropy.io.ascii)
    • VOTable Handling (astropy.io.votable)
    • ECVS, HDF5, Parquet, PyArrow CSV, YAML (astropy.io.misc)
    • Cosmological Calculations (astropy.cosmology)
    • Convolution and Filtering (astropy.convolution)
    • IERS data access (astropy.utils.iers)
    • Data Visualization (astropy.visualization)
    • Astrostatistics Tools (astropy.stats)
    • Masked Values and Quantities (astropy.utils.masked)
    • SAMP (Simple Application Messaging Protocol) (astropy.samp)
    • Configuration System (astropy.config)
    • I/O Registry (astropy.io.registry)
    • I/O Typing (astropy.io.typing)
    • Logging system
    • Python warnings system
    • Astropy Core Package Utilities (astropy.utils)
      • Downloadable Data Management (astropy.utils.data)
      • Reference/API
        • make_function_with_signature
        • HomogeneousList
        • color_print
        • human_file_size
        • human_time
        • isatty
        • print_code_line
        • terminal_size
        • ProgressBar
        • ProgressBarOrSpinner
        • Spinner
        • data_info_factory
        • dtype_info_name
        • BaseColumnInfo
        • DataInfo
        • MixinInfo
        • ParentDtypeInfo
        • deprecated
        • deprecated_attribute
        • deprecated_renamed_argument
        • format_doc
        • classproperty
        • lazyproperty
        • sharedmethod
        • diff_values
        • report_diff_values
        • where_not_allclose
        • AstropyBackwardsIncompatibleChangeWarning
        • AstropyDeprecationWarning
        • AstropyPendingDeprecationWarning
        • AstropyUserWarning
        • AstropyWarning
        • DuplicateRepresentationWarning
        • Conf
        • IERS
        • IERSDegradedAccuracyWarning
        • IERSRangeError
        • IERSStaleWarning
        • IERSWarning
        • IERS_A
        • IERS_Auto
        • IERS_B
        • LeapSeconds
        • earth_orientation_table
        • find_current_module
        • isinstancemethod
        • minversion
        • resolve_name
        • enable_merge_strategies
        • merge
        • common_dtype
        • MetaAttribute
        • MetaData
        • MergeNpConcatenate
        • MergePlus
        • MergeStrategy
        • MergeConflictError
        • MergeConflictWarning
        • dtype_bytes_or_chars
        • find_api_page
        • format_exception
        • indent
        • isiterable
        • online_help
        • silence
        • JsonCustomEncoder
        • NumpyRNGContext
        • lex
        • yacc
        • ThreadSafeParser
        • ScienceState
        • check_broadcast
        • simplify_basic_index
        • unbroadcast
        • IncompatibleShapeError
        • NDArrayShapeMethods
        • ShapedLikeNDArray
        • system_info
        • cache_contents
        • cache_total_size
        • check_download_cache
        • check_free_space_in_dir
        • clear_download_cache
        • compute_hash
        • download_file
        • download_files_in_parallel
        • export_download_cache
        • get_cached_urls
        • get_file_contents
        • get_free_space_in_dir
        • get_pkg_data_contents
        • get_pkg_data_filename
        • get_pkg_data_filenames
        • get_pkg_data_fileobj
        • get_pkg_data_fileobjs
        • get_pkg_data_path
        • get_readable_fileobj
        • import_download_cache
        • import_file_to_cache
        • is_url
        • is_url_in_cache
        • CacheDamaged
        • CacheMissingWarning
        • Conf
        • check_anyuri
        • check_id
        • check_mime_content_type
        • check_token
        • fix_id
        • get_xml_encoding
        • get_xml_iterator
        • xml_readlines
        • unescape_all
        • validate_schema
        • XMLWriter
    • Environment variables
    • Astropy Glossary
  • Contributing
  • Project Details
  • User Guide
  • Astropy Core Package Utilities (astropy.utils)
  • Reference/API
  • unbroadcast

unbroadcast#

astropy.utils.shapes.unbroadcast(array)[source]#

Given an array, return a new array that is the smallest subset of the original array that can be re-broadcasted back to the original array.

See https://stackoverflow.com/questions/40845769/un-broadcasting-numpy-arrays for more details.

previous

simplify_basic_index

next

IncompatibleShapeError

Edit

© Copyright 2011–2026, The Astropy Developers.

Code of Conduct

Updated on 21 May 2026 , built with Sphinx 9.1.0