https://github.com/ready-steady/hdf5
Reader and writer of HDF5 files
https://github.com/ready-steady/hdf5
data-format science
Last synced: 12 months ago
JSON representation
Reader and writer of HDF5 files
- Host: GitHub
- URL: https://github.com/ready-steady/hdf5
- Owner: ready-steady
- License: mit
- Created: 2015-03-25T15:39:56.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2017-07-15T04:51:50.000Z (over 8 years ago)
- Last Synced: 2025-04-01T10:35:38.910Z (about 1 year ago)
- Topics: data-format, science
- Language: Go
- Size: 28.3 KB
- Stars: 18
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# HDF5 [![Build Status][travis-img]][travis-url]
The package provides a reader and writer of [HDF5][1] files.
## [Documentation][doc]
## Installation
Fetch the package:
```bash
go get -d github.com/ready-steady/hdf5
```
Go to the directory of the package:
```bash
cd $GOPATH/src/github.com/ready-steady/hdf5
```
Install the package:
```bash
make install
```
## Usage
```go
package main
import (
"fmt"
"github.com/ready-steady/hdf5"
)
func main() {
put("data.h5")
get("data.h5")
}
func put(path string) {
file, _ := hdf5.Create(path)
defer file.Close()
A := 42
file.Put("A", A)
B := []float64{1, 2, 3}
file.Put("B", B)
C := struct {
D int
E []float64
}{
D: 42,
E: []float64{1, 2, 3},
}
file.Put("C", C)
}
func get(path string) {
file, _ := hdf5.Open(path)
defer file.Close()
A := 0
file.Get("A", &A)
fmt.Println(A)
B := []float64{}
file.Get("B", &B)
fmt.Println(B)
C := struct {
D int
E []float64
}{}
file.Get("C", &C)
fmt.Println(C)
}
```
## Contribution
1. Fork the project.
2. Implement your idea.
3. Open a pull request.
[1]: https://en.wikipedia.org/wiki/Hierarchical_Data_Format
[doc]: http://godoc.org/github.com/ready-steady/hdf5
[travis-img]: https://travis-ci.org/ready-steady/hdf5.svg?branch=master
[travis-url]: https://travis-ci.org/ready-steady/hdf5