[List,Array]Int[8,16]
is expanded to mean ListInt8
, ArrayInt8
, ListInt16
, and ArrayInt16
. The literals float
and int
can be abbreviated by f
and i
, respectively.T
in this example:T
can be replaced by int32
or double
. This can also be written without using a variable.[]
) to the type literal.'Array<double>'
syntax.rbc.stdlib.array_api.mean
computes the mean over an array of inputs f_array
. We can also have output arrays.rbc.stdlib.array_api.mean
is a special function bundled with RBC. In this case, numpy.mean
has been overridden for convenience to users familiar with NumPy’s API. See here for more details and information about supported functions.Array
must be used to define an empty array. It can then be indexed to be filled. Slicing or complex indexing is not currently supported. If the array is returned, it’s important that the type specified during the array creation matches the return type specified in the function signature.list
, dict
or numpy.array
cannot be used to construct arrays supported by RBC. See here for a complete list of array creation functions.device
in the decorator when registering the function. The device argument is a list that can take 'cpu'
and 'gpu'
. The option indicates which implementation should be available and used. Hence, if there is no GPU on the server, using 'gpu'
would not work on the platform.device=['cpu', 'gpu']
.'gpu'
, only NVIDIA GPUs that can handle CUDA instructions are currently supported.RemoteHeavyDB.register()
after every function declaration. Instead, use a single call after all functions are defined.heavy
.fahrenheit2celsius
:execute
method:execute
method is a convenience feature; it should not be used in production code. For production code, use heavyai or ibis via the ibis-heavyai backend to compose SQL queries using an ORM-like syntax.