gonum / gonum/hdf5

Example of writing a dataset

Open
#80 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
135
Forks
34
PR merge metrics
No merged PRs in 30d

Description

### What are you trying to do?
I'm trying to write an array in a dataset, what I do is reading it, applying some operations to the data and then I want to write it back. At the moment of writing it back I've tried:

```
dataToWrite := ts.Data().([]float32)
err = ds.WriteSubset(dataToWrite, nil, nil)
```

```
dataToWrite := ts.Data().([]float32)
err = ds.WriteSubset(&dataToWrite, nil, nil)
```

```
dataToWrite := ts.Data().([]float32)
err = ds.WriteSubset(dataToWrite, dspace, nil)
```

etc...

but all of them fail with either:

```
panic: reflect.Value.UnsafeAddr of unaddressable value
```

or

```
panic: code -1
```

so I'm not sure what I'm missing here

thanks in advance

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported calls to ts.Data() and ds.WriteSubset(), including slice, pointer, and dspace arguments. Read the WriteSubset usage and dataset-writing examples available in the repository, then document a working array-writing example and the expected handling of these arguments.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.