hdf5 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/hdf5.gemspec +2 -2
- data/lib/hdf5.rb +4 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5a7d2fd35b006365a1df3597b2b870c203ec073
|
4
|
+
data.tar.gz: bfe6c9b521409d4454ffe8151d86538363f515d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa96ae2f04220d8bc0a11fff276c214f837308346a0be02fdcf74fe7a51ba0947bcf4f1384eda335c914fd3bb9c1da3c91a126cdf11ab28ffaae940e8f9063e7
|
7
|
+
data.tar.gz: ebee6c87c993a06b3fd99c17dd03d33d7c0d9cc269c5c5c97e6faed930fe886ea5519bc4dc0b17181546ca836f0278f09320b1b0cd8816cd8bcf2b5b6058592d
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.1
|
data/hdf5.gemspec
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: hdf5 0.3.
|
5
|
+
# stub: hdf5 0.3.1 ruby lib
|
6
6
|
# stub: ext/hdf5/extconf.rb
|
7
7
|
|
8
8
|
Gem::Specification.new do |s|
|
9
9
|
s.name = "hdf5"
|
10
|
-
s.version = "0.3.
|
10
|
+
s.version = "0.3.1"
|
11
11
|
|
12
12
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
13
13
|
s.require_paths = ["lib"]
|
data/lib/hdf5.rb
CHANGED
@@ -142,6 +142,7 @@ module Hdf5
|
|
142
142
|
# the data elements and the size and shape of the
|
143
143
|
# data array.
|
144
144
|
class H5Dataset
|
145
|
+
class NotFound < StandardError; end
|
145
146
|
extend FFI::Library
|
146
147
|
ffi_lib H5Library.library_path
|
147
148
|
attach_function :basic_open, :H5Dopen2, [H5Types.hid_t, :string, H5Types.hid_t], H5Types.hid_t
|
@@ -152,7 +153,9 @@ module Hdf5
|
|
152
153
|
# Open the dataset. location_id is the id of the parent
|
153
154
|
# file or group. Returns and H5Dataset object
|
154
155
|
def self.open(location_id, name)
|
155
|
-
|
156
|
+
id = basic_open(location_id, name, 0)
|
157
|
+
raise NotFound.new("dataset #{name} not found") if id < 0
|
158
|
+
return new(id)
|
156
159
|
end
|
157
160
|
# Create a new object. id is the id of the HDF5 dataset this wraps.
|
158
161
|
# Use H5Dataset.open to open a dataset
|