Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.io.base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.io.base
Commits
2f0ee602
Commit
2f0ee602
authored
11 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
Fix last non-passing test
parent
a0e61539
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
xbob/io/hdf5.cpp
+23
-2
23 additions, 2 deletions
xbob/io/hdf5.cpp
with
23 additions
and
2 deletions
xbob/io/hdf5.cpp
+
23
−
2
View file @
2f0ee602
...
@@ -311,6 +311,24 @@ static bob::io::hdf5type PyBobIo_H5FromTypenum (int type_num) {
...
@@ -311,6 +311,24 @@ static bob::io::hdf5type PyBobIo_H5FromTypenum (int type_num) {
#ifdef NPY_COMPLEX256
#ifdef NPY_COMPLEX256
case
NPY_COMPLEX256
:
return
bob
::
io
::
c256
;
case
NPY_COMPLEX256
:
return
bob
::
io
::
c256
;
#endif
#endif
case
NPY_LONGLONG
:
switch
(
NPY_BITSOF_LONGLONG
)
{
case
8
:
return
bob
::
io
::
i8
;
case
16
:
return
bob
::
io
::
i16
;
case
32
:
return
bob
::
io
::
i32
;
case
64
:
return
bob
::
io
::
i64
;
default:
return
bob
::
io
::
unsupported
;
}
break
;
case
NPY_ULONGLONG
:
switch
(
NPY_BITSOF_LONGLONG
)
{
case
8
:
return
bob
::
io
::
u8
;
case
16
:
return
bob
::
io
::
u16
;
case
32
:
return
bob
::
io
::
u32
;
case
64
:
return
bob
::
io
::
u64
;
default:
return
bob
::
io
::
unsupported
;
}
break
;
default
:
return
bob
::
io
::
unsupported
;
default
:
return
bob
::
io
::
unsupported
;
}
}
...
@@ -766,7 +784,7 @@ static PyObject* PyBobIoHDF5File_ListRead(PyBobIoHDF5FileObject* self, PyObject
...
@@ -766,7 +784,7 @@ static PyObject* PyBobIoHDF5File_ListRead(PyBobIoHDF5FileObject* self, PyObject
Py_ssize_t
pos
=
-
1
;
Py_ssize_t
pos
=
-
1
;
if
(
!
PyArg_ParseTupleAndKeywords
(
args
,
kwds
,
"s|n"
,
kwlist
,
&
key
,
&
pos
))
return
0
;
if
(
!
PyArg_ParseTupleAndKeywords
(
args
,
kwds
,
"s|n"
,
kwlist
,
&
key
,
&
pos
))
return
0
;
if
(
pos
>=
0
)
return
PyBobIoHDF5File_Xread
(
self
,
key
,
1
,
pos
);
if
(
pos
>=
0
)
return
PyBobIoHDF5File_Xread
(
self
,
key
,
0
,
pos
);
//otherwise returns as a list
//otherwise returns as a list
const
std
::
vector
<
bob
::
io
::
HDF5Descriptor
>*
D
=
0
;
const
std
::
vector
<
bob
::
io
::
HDF5Descriptor
>*
D
=
0
;
...
@@ -1003,7 +1021,10 @@ static int PyBobIoHDF5File_GetObjectType(PyObject* o, bob::io::HDF5Type& t,
...
@@ -1003,7 +1021,10 @@ static int PyBobIoHDF5File_GetObjectType(PyObject* o, bob::io::HDF5Type& t,
PyArrayObject
*
np
=
reinterpret_cast
<
PyArrayObject
*>
(
*
converted
);
PyArrayObject
*
np
=
reinterpret_cast
<
PyArrayObject
*>
(
*
converted
);
bob
::
io
::
hdf5type
h5type
=
PyBobIo_H5FromTypenum
(
PyArray_DESCR
(
np
)
->
type_num
);
bob
::
io
::
hdf5type
h5type
=
PyBobIo_H5FromTypenum
(
PyArray_DESCR
(
np
)
->
type_num
);
if
(
h5type
==
bob
::
io
::
unsupported
)
return
-
1
;
if
(
h5type
==
bob
::
io
::
unsupported
)
{
Py_CLEAR
(
*
converted
);
return
-
1
;
}
bob
::
io
::
HDF5Shape
h5shape
(
PyArray_NDIM
(
np
),
PyArray_DIMS
(
np
));
bob
::
io
::
HDF5Shape
h5shape
(
PyArray_NDIM
(
np
),
PyArray_DIMS
(
np
));
t
=
bob
::
io
::
HDF5Type
(
h5type
,
h5shape
);
t
=
bob
::
io
::
HDF5Type
(
h5type
,
h5shape
);
return
3
;
return
3
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment