PlasmaCalcs
  • Usage
  • PlasmaCalcs API
    • plasma_calculator
    • quantities
    • dimensions
    • units
    • hookups
    • addons
    • other_calculators
    • mhd
    • multi_run_analysis
    • tools
      • array_select
      • arrays
      • display
      • docs_tools
      • fft_tools
      • history
      • imports
      • io_tools
      • iterables
      • math
      • multiprocessing
      • oop_tools
      • os_tools
      • properties
      • pytools
      • sci_tools
      • sentinels
      • sql_tools
      • supercomputer
      • timing
      • trees
      • xarray_tools
        • xarray_accessors
        • xarray_agg_stats
        • xarray_coords
        • xarray_dimensions
        • xarray_grids
        • xarray_indexing
        • xarray_io
        • xarray_masks
        • xarray_misc
        • xarray_sci
        • xarray_size_check
        • xarray_vectors
        • xarray_werr_stats
    • plotting
    • defaults
    • errors
PlasmaCalcs
  • PlasmaCalcs API
  • tools
  • xarray_tools
  • xarray_indexing
  • xarray_search
  • View page source

xarray_search

PlasmaCalcs.tools.xarray_tools.xarray_indexing.xarray_search(array, dim, value)

return first index of value along dim

(or coord. returns 0, not crash, if scalar coord which matches value.)
Not efficient for large dims. For large sorted dims, see xarray.DataArray.searchsorted.
crash with DimensionValueError if value not found in dim.
Previous Next

© Copyright 2025, PlasmaCalcs Developers.

Built with Sphinx using a theme provided by Read the Docs.