Dagger
Search

numpy-wrapper

This module has been generated via dagger init and serves as a reference to
basic module structure as you get started with Dagger.

Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.

The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.

Installation

dagger install github.com/Abraxas1010/numpy-wrapper-module@fcdff34aef09744c126ccf0c26c0efc7417335c3

Entrypoint

Return Type
NumpyWrapper !
Example
dagger -m github.com/Abraxas1010/numpy-wrapper-module@fcdff34aef09744c126ccf0c26c0efc7417335c3 call \
func (m *MyModule) Example() *dagger.NumpyWrapper  {
	return dag.
			NumpyWrapper()
}
@function
def example() -> dagger.NumpyWrapper:
	return (
		dag.numpy_wrapper()
	)
@func()
example(): NumpyWrapper {
	return dag
		.numpyWrapper()
}

Types

NumpyWrapper 🔗

containerEcho() 🔗

Returns a container that echoes whatever string argument is provided

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
stringArgString !-No description provided
Example
dagger -m github.com/Abraxas1010/numpy-wrapper-module@fcdff34aef09744c126ccf0c26c0efc7417335c3 call \
 container-echo --string-arg string
func (m *MyModule) Example(stringArg string) *dagger.Container  {
	return dag.
			NumpyWrapper().
			ContainerEcho(stringArg)
}
@function
def example(string_arg: str) -> dagger.Container:
	return (
		dag.numpy_wrapper()
		.container_echo(string_arg)
	)
@func()
example(stringArg: string): Container {
	return dag
		.numpyWrapper()
		.containerEcho(stringArg)
}

createRandomArray() 🔗

Creates a random square NumPy array of a given size and returns it as a string.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
sizeInteger !5No description provided
Example
dagger -m github.com/Abraxas1010/numpy-wrapper-module@fcdff34aef09744c126ccf0c26c0efc7417335c3 call \
 create-random-array --size integer
func (m *MyModule) Example(ctx context.Context, size int) string  {
	return dag.
			NumpyWrapper().
			CreateRandomArray(ctx, size)
}
@function
async def example(size: int) -> str:
	return await (
		dag.numpy_wrapper()
		.create_random_array(size)
	)
@func()
async example(size: number): Promise<string> {
	return dag
		.numpyWrapper()
		.createRandomArray(size)
}

grepDir() 🔗

Returns lines that match a pattern in the files of the provided Directory

Return Type
String !
Arguments
NameTypeDefault ValueDescription
directoryArgDirectory !-A directory.
patternString !-No description provided
Example
dagger -m github.com/Abraxas1010/numpy-wrapper-module@fcdff34aef09744c126ccf0c26c0efc7417335c3 call \
 grep-dir --directory-arg DIR_PATH --pattern string
func (m *MyModule) Example(ctx context.Context, directoryArg *dagger.Directory, pattern string) string  {
	return dag.
			NumpyWrapper().
			GrepDir(ctx, directoryArg, pattern)
}
@function
async def example(directory_arg: dagger.Directory, pattern: str) -> str:
	return await (
		dag.numpy_wrapper()
		.grep_dir(directory_arg, pattern)
	)
@func()
async example(directoryArg: Directory, pattern: string): Promise<string> {
	return dag
		.numpyWrapper()
		.grepDir(directoryArg, pattern)
}

matrixMultiply() 🔗

Creates and multiplies two 3x3 matrices and returns the result as a string.

Return Type
String !
Example
dagger -m github.com/Abraxas1010/numpy-wrapper-module@fcdff34aef09744c126ccf0c26c0efc7417335c3 call \
 matrix-multiply
func (m *MyModule) Example(ctx context.Context) string  {
	return dag.
			NumpyWrapper().
			MatrixMultiply(ctx)
}
@function
async def example() -> str:
	return await (
		dag.numpy_wrapper()
		.matrix_multiply()
	)
@func()
async example(): Promise<string> {
	return dag
		.numpyWrapper()
		.matrixMultiply()
}