Git Product home page Git Product logo

Comments (3)

neutrinoceros avatar neutrinoceros commented on July 26, 2024 1

Nice catch ! I didn't know about -X dev, looks very useful !
I think you're right that changing the signature of get_box_grids_level would fix it, but I think it would also make the code less clear, so I'd prefer to fix the call sites instead if we can.
Something like

diff --git a/yt/frontends/gdf/data_structures.py b/yt/frontends/gdf/data_structures.py
index 1bb7a88b6..0817c2aa1 100644
--- a/yt/frontends/gdf/data_structures.py
+++ b/yt/frontends/gdf/data_structures.py
@@ -115,7 +115,7 @@ class GDFHierarchy(GridIndex):
             get_box_grids_level(
                 self.grid_left_edge[gi, :],
                 self.grid_right_edge[gi, :],
-                self.grid_levels[gi],
+                self.grid_levels[gi].item(),
                 self.grid_left_edge,
                 self.grid_right_edge,
                 self.grid_levels,

from yt.

neutrinoceros avatar neutrinoceros commented on July 26, 2024 1

Ah, trying to fix callsites I found that this was already partially done in #4422
Mostly likely, the difference is that some call sites, as the one you found, are not covered by tests.

from yt.

chrishavlin avatar chrishavlin commented on July 26, 2024

I didn't know about -X dev, looks very useful !
Ya, I didn't know about it either! but was looking for an easy way to trigger the deprecation warning for sake of reproducing it since this test isn't covered by a pytest test.

from yt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.