🔍 Code Extractor

Browse Components

Showing 20 of 2143 components

  • function flatten

    Recursively flattens an arbitrarily nested sequence containing lists, tuples, and dictionaries into a single-level generator of non-sequence elements.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 2284-2308

    flatten nested-sequences recursion generator data-processing
  • function cast_array_to_int64

    Converts a numpy array to int64 dtype while suppressing FutureWarning about datetime64 to int64 casting that is deprecated in newer numpy/pandas versions.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 2264-2281

    numpy type-conversion datetime int64 warning-suppression
  • function closest_match

    Recursively finds the closest matching specification from a list of specs by comparing hierarchical keys (type, group, label, overlay) with a target match pattern.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 2230-2261

    matching recursive hierarchical specification pattern-matching
  • function numpy_scalar_to_python

    Converts NumPy scalar types to their equivalent native Python types (float or int), returning the original value if it's not a NumPy numeric scalar.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 2218-2227

    numpy type-conversion scalar data-processing utility
  • function mimebundle_to_html

    Converts a MIME bundle (dictionary or tuple of data and metadata) into HTML string representation, including any embedded JavaScript.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 2203-2215

    mime-bundle html-conversion jupyter rich-display javascript
  • function compute_edges

    Converts bin centers to bin edges by computing midpoints between consecutive centers and extrapolating equidistant boundaries at the extremes.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 2189-2200

    binning histogram data-processing numpy edges
  • function search_indices

    Finds the indices of specified values within a source array by using sorted search for efficient lookup.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 2180-2186

    array-search indexing numpy data-lookup sorting
  • function cftime_to_timestamp

    Converts cftime datetime objects (or arrays) to timestamps since Unix epoch (1970-01-01 00:00:00) in specified time units, defaulting to microseconds.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 2156-2178

    datetime cftime timestamp calendar-conversion climate-data
  • function dt_to_int

    Converts various datetime types (pandas, numpy, cftime, Python datetime) to an integer timestamp with a specified time unit.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 2110-2153

    datetime timestamp conversion time-series pandas
  • function parse_datetime_selection

    Converts string or datetime-like selection specifications into parsed datetime objects, handling single values, slices, and collections.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 2094-2107

    datetime parsing data-selection time-series normalization
  • function parse_datetime_v1

    Converts various date representations (string, integer, pandas Timestamp) into a numpy datetime64 object using pandas datetime parsing capabilities.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 2085-2091

    datetime date-parsing pandas numpy datetime64
  • function date_range

    Generates an evenly-spaced date range array with a specified number of samples between start and end dates, with dates centered in each interval.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 2073-2082

    datetime date-range time-series numpy pandas
  • function compute_density

    Computes the density (samples per unit) of a grid given start and end boundaries and the number of samples, with special handling for datetime/timedelta types.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 2055-2070

    density grid datetime timedelta sampling
  • function validate_regular_sampling

    Validates whether a 1D array has regular (uniform) sampling by checking if the variation in consecutive differences is within a specified relative tolerance of the minimum sampling step.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 2045-2052

    validation sampling uniformity numerical-analysis time-series
  • function bound_range

    Computes a bounding range and density from evenly spaced samples, extending the range by half the density on each side and detecting if values are inverted.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 2017-2042

    data-processing bounds-calculation density-computation numerical-precision datetime-handling
  • function is_nan

    A type-safe utility function that checks whether a given value is NaN (Not a Number), handling arbitrary types without raising exceptions.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 2007-2014

    validation nan-check type-safe data-validation numpy
  • function dt64_to_dt

    Converts a NumPy datetime64 object to a Python datetime.datetime object by calculating seconds since Unix epoch.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 1999-2004

    datetime numpy conversion datetime64 time-conversion
  • function expand_grid_coords

    Expands coordinates along a specified dimension of a gridded dataset into an N-dimensional array that matches the full dimensionality of the dataset.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 1980-1996

    grid coordinates broadcasting multidimensional cartesian-product
  • function dimensioned_streams

    Filters and returns streams from a DynamicMap that have parameters matching the DynamicMap's key dimensions.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 1967-1977

    holoviews streams dynamicmap dimensions filtering
  • function arglexsort

    Returns the indices that would lexicographically sort multiple arrays, treating them as columns of a structured array.

    File: /tf/active/vicechatdev/patches/util.py | Lines: 1955-1964

    sorting lexicographical-sort multi-key-sort numpy array-manipulation