reservoirpy.mat_gen.ones#

reservoirpy.mat_gen.ones = <reservoirpy.mat_gen.Initializer (_ones) object>[source]#

Create an array filled with 1.

Parameters:
  • *shape (int, int, ..., optional) – Shape (row, columns, …) of the array.

  • sr (float, optional) – If defined, then will rescale the spectral radius of the matrix to this value.

  • input_scaling (float or array, optional) – If defined, then will rescale the matrix using this coefficient or array of coefficients.

  • dtype (numpy.dtype, default to numpy.float64) – A Numpy numerical type.

Returns:

If a shape is given to the initializer, then returns a matrix. Else, returns a function partially initialized with the given keyword parameters, which can be called with a shape and returns a matrix.

Return type:

Numpy array or callable