# wrap_function_change_dimensions function¶

(Shortest import: from brian2.units.fundamentalunits import wrap_function_change_dimensions)

brian2.units.fundamentalunits.wrap_function_change_dimensions(func, change_dim_func)[source]

Returns a new function that wraps the given function func so that it changes the dimensions of its input. Quantities are transformed to unitless numpy arrays before calling func, the output is a quantity with the original dimensions passed through the function change_dim_func. A typical use would be a sqrt function that uses lambda d: d ** 0.5 as change_dim_func.

These transformations apply only to the very first argument, all other arguments are ignored/untouched.