Skip to content

Add low/high range values for random tensor generators #475

@dmdunla

Description

@dmdunla

Currently, the random tensor generators tenrand and sptenrand generate tensor entries uniformly in the range [0,1].

Suggestion: Consider adding functionality to these methods for generating in other ranges.

Currently in the tutorials, we have the following code to accomplish this:

a = -1
b = 42
np.random.seed(0)
X = ttb.tenrand((2, 4, 3)) * (b - a) + a

And the suggestion is to add the new functionality such that we could call the method as follows (akin to numpy.random.uniform):

X = ttb.tenrand((2, 4, 3), low=-1, high=42)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions