set

Contents

set#

class brainpy.math.set(mode=None, membrane_scaling=None, dt=None, x64=None, complex_=None, float_=None, int_=None, bool_=None, bp_object_as_pytree=None, numpy_func_return=None)[source]#

Set the default computation environment.

Parameters:
  • mode (Optional[Mode]) – The computing mode.

  • membrane_scaling (Optional[Scaling]) – The numerical membrane_scaling.

  • dt (Optional[float]) – The numerical integration precision.

  • x64 (Optional[bool]) – Enable x64 computation.

  • complex_ (Optional[type]) – The complex data type.

  • float_ (Optional[type]) – The floating data type.

  • int_ (Optional[type]) – The integer data type.

  • bool_ (Optional[type]) – The bool data type.

  • bp_object_as_pytree (Optional[bool]) – Whether to register brainpy object as pytree.

  • numpy_func_return (Optional[str]) – The array to return in all numpy functions. Support ‘bp_array’ and ‘jax_array’.