def register_primitives(reg, prim_wrapper): """Register primitives in numpy""" numpy_wrapper.wrap_namespace(np.__dict__, reg, prim_wrapper) # additional primitives reg.register('_minpy_getitem', prim_wrapper(_minpy_getitem)) reg.register('sigmoid', prim_wrapper(_sigmoid)) reg.register('onehot_encode', prim_wrapper(_onehot_encode))
def register_primitives(reg, prim_wrapper): """ Register primitives """ numpy_wrapper.wrap_namespace(numpy.random.__dict__, reg, prim_wrapper)
def register_primitives(reg, prim_wrapper): """ Register primitives in numpy """ numpy_wrapper.wrap_namespace(np.__dict__, reg, prim_wrapper) # additional primitives reg.register('_minpy_getitem', prim_wrapper(_minpy_getitem))