Git Product home page Git Product logo

Comments (5)

mkitti avatar mkitti commented on June 11, 2024
julia> haskey(f, "./aa")
false

This does not throw an error, but perhaps it should be true?

julia> HDF5.API.h5l_exists(f, "./aa", HDF5.API.H5P_DEFAULT)
true

julia> HDF5.API.h5l_exists(f, "aa//", HDF5.API.H5P_DEFAULT)
true

julia> HDF5.API.h5l_exists(f, "bb//cc", HDF5.API.H5P_DEFAULT)
true

julia> HDF5.API.h5l_exists(f, "aa/c", HDF5.API.H5P_DEFAULT)
ERROR: HDF5.API.H5Error: Cannot determine whether aa/c exists
...

Should "aa/c" not error? It does not exist.

from hdf5.jl.

simonbyrne avatar simonbyrne commented on June 11, 2024

Should "aa/c" not error? It does not exist.

I would say it should return false.

from hdf5.jl.

mkitti avatar mkitti commented on June 11, 2024

In #978 and #979, I'm expanding and updating the low level H5O bindings, which seem relevant here based on the h5py code.

from hdf5.jl.

mkitti avatar mkitti commented on June 11, 2024

At the end of the loop, it looks like we will need API.h5o_get_info_by_name to check if the object is a group before iterating again.

We will need to write a high level hdf5type function that abstracts over the different h5o_get_info_by_name versions (1 vs 3). For version 3, we can use H5O_INFO_BASIC as the fields argument.

from hdf5.jl.

mkitti avatar mkitti commented on June 11, 2024

Here's a link to has_key in this code base. The function is recursive rather than iterative.

from hdf5.jl.

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.