🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.debian.bugs.dist
1 messages
1 total messages Started by Sebastian Ramacher Sat, 31 Oct 2026 08:10
Bug#1152672: yt: FTBFS: unyt.exceptions.UnitConversionError: Cannot convert between 'code_length' (dim '(length)') and 'dimensio...
#2782
Author: Sebastian Ramacher
Date: Sat, 31 Oct 2026 08:10
111 lines
6135 bytes
Source: yt
Version: 4.4.2-1
Severity: serious
Tags: ftbfs
Justification: fails to build from source (but built successfully in the past)
X-Debbugs-Cc: sramacher@debian.org

Dear maintainer,

yt FTBFS:


=================================== FAILURES ===================================
________________________ test_ghost_zone_extrapolation _________________________

    def test_ghost_zone_extrapolation():
        ds = fake_random_ds(16)
    
        g = ds.index.grids[0]
        vec = g.get_vertex_centered_data(
            [("index", "x"), ("index", "y"), ("index", "z")], no_ghost=True
        )
        for i, ax in enumerate("xyz"):
            xc = g["index", ax]
    
            tf = lin.TrilinearFieldInterpolator(
                xc,
                (
                    g.LeftEdge[0] + g.dds[0] / 2.0,
                    g.RightEdge[0] - g.dds[0] / 2.0,
                    g.LeftEdge[1] + g.dds[1] / 2.0,
                    g.RightEdge[1] - g.dds[1] / 2.0,
                    g.LeftEdge[2] + g.dds[2] / 2.0,
                    g.RightEdge[2] - g.dds[2] / 2.0,
                ),
                ["x", "y", "z"],
                truncate=True,
            )
    
            lx, ly, lz = np.mgrid[
                g.LeftEdge[0] : g.RightEdge[0] : (g.ActiveDimensions[0] + 1) * 1j,
                g.LeftEdge[1] : g.RightEdge[1] : (g.ActiveDimensions[1] + 1) * 1j,
                g.LeftEdge[2] : g.RightEdge[2] : (g.ActiveDimensions[2] + 1) * 1j,
            ]
>           xi = tf({"x": lx, "y": ly, "z": lz})
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

yt/utilities/tests/test_interpolators.py:136: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
yt/utilities/linear_interpolators.py:209: in __call__
    x_i = np.digitize(x_vals, self.x_bins).astype("int64") - 1
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/unyt/array.py:2133: in __array_function__
    return _HANDLED_FUNCTIONS[func](*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/unyt/_array_functions.py:398: in digitize
    sanitized_bins = _sanitize_bins(x, bins)
                     ^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/unyt/_array_functions.py:174: in _sanitize_bins
    return bins.to_value(getattr(arr, "units", dimensionless))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/unyt/array.py:1047: in to_value
    v = self.in_units(units, equivalence=equivalence, **kwargs).value
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/unyt/array.py:928: in in_units
    (conversion_factor, offset) = self.units.get_conversion_factor(
/usr/lib/python3/dist-packages/unyt/unit_object.py:686: in get_conversion_factor
    return _get_conversion_factor(self, other_units, dtype)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

old_units = code_length, new_units = dimensionless, dtype = dtype('float64')

    def _get_conversion_factor(old_units, new_units, dtype):
        """
        Get the conversion factor between two units of equivalent dimensions. This
        is the number you multiply data by to convert from values in `old_units` to
        values in `new_units`.
    
        Parameters
        ----------
        old_units: str or Unit object
            The current units.
        new_units : str or Unit object
            The units we want.
        dtype: NumPy dtype
            The dtype of the conversion factor
    
        Returns
        -------
        conversion_factor : float
            `old_units / new_units`
        offset : float or None
            Offset between the old unit and new unit.
    
        """
        if old_units.dimensions != new_units.dimensions:
>           raise UnitConversionError(
                old_units, old_units.dimensions, new_units, new_units.dimensions
            )
E           unyt.exceptions.UnitConversionError: Cannot convert between 'code_length' (dim '(length)') and 'dimensionless' (dim '1').

/usr/lib/python3/dist-packages/unyt/unit_object.py:931: UnitConversionError

See
https://buildd.debian.org/status/fetch.php?pkg=yt&arch=amd64&ver=4.4.2-1%2Bb3&stamp=1793402058&raw=0
for details.

Cheers
-- 
Sebastian Ramacher
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads