Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • bob bob
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • bob
  • bobbob
  • Issues
  • #165

Closed
Open
Created Sep 16, 2013 by André Anjos@andre.anjos💬Owner

Can't write one-element ndarray in HDF5

Created by: siebenkopf

When I try to write a single-element numpy.ndarray to HDF5File, and read it again, the type of the variable changes:

> import bob, numpy
> f = bob.io.HDF5File("t.hdf5", "w")
> a = numpy.ndarray((1,), dtype=numpy.int)
> type(a)

type 'numpy.ndarray'

> f.set("a", a)
> b = f.read("a")
> type(b)

type 'int'

The point is that it works well with 2-element arrays, and I want to write ndarrays of different sizes (also with a single element). Currently, this is not supported.

Assignee
Assign to
Time tracking