Skip to content

Commit

Permalink
copy core method
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyCBakerPhD authored Dec 10, 2023
1 parent f95b1ef commit 6ce7c7c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/hdmf/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from copy import deepcopy
from uuid import uuid4
from warnings import warn
from typing import Type

import h5py
import numpy as np
Expand Down Expand Up @@ -789,6 +790,15 @@ def set_dataio(self, **kwargs):
dataio.data = self.__data
self.__data = dataio

@docval(
{'name': 'data_io_class', 'type': Type[DataIO], 'doc': 'The DataIO to apply to the data held by this Data.'}
{'name': 'data_io_kwargs', 'type': dict, 'doc': 'The keyword arguments to pass to the DataIO.'}
)
def set_data_io(self, **kwargs):
"""Apply DataIO object to the data held by this Data object."""
data_io_class, data_io_kwargs = getargs('data_io_class', 'data_io_kwargs', kwargs)
self.__data = data_io_class(data=self.__data, **data_io_kwargs)

@docval({'name': 'func', 'type': types.FunctionType, 'doc': 'a function to transform *data*'})
def transform(self, **kwargs):
"""
Expand Down

0 comments on commit 6ce7c7c

Please sign in to comment.