Skip to content

Example of writing a dataset #80

@dcu

Description

@dcu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions