caterva2.Client.lazyexpr#
- Client.lazyexpr(name, expression, operands)#
Creates a lazy expression dataset in personal space.
A dataset with the specified name will be created or overwritten if already exists.
- Parameters:
- Returns:
Path of the created dataset.
- Return type:
Path
Examples
>>> import caterva2 as cat2 >>> import numpy as np >>> # To create a lazyexpr you need to be a registered used >>> client = cat2.Client('https://cat2.cloud/demo', ("joedoe@example.com", "foobar")) >>> src_path = f'@personal/dir{np.random.randint(0, 100)}/ds-4d.b2nd' >>> path = client.upload('root-example/dir1/ds-2d.b2nd', src_path) >>> client.lazyexpr('example-expr', 'a + a', {'a': path}) PurePosixPath('@personal/example-expr.b2nd') >>> 'example-expr.b2nd' in client.get_list('@personal') True