perlin-numpy
perlin-numpy copied to clipboard
Random Seed as Parameter & Added Res Validity Check
This PR lets the user set a random seed value for both the 2d and 3d perlin noise functions
Hi,
Do we really want to set the numpy seed inside the functions? It may silently mess the global state of applications that consume the library and provoke strange bugs.
Hi @pvigier,
That's a really good point for the case when people don't want control over the seed.
This could be handled by including a if seed is not None and only running np.random.seed(seed) if that's the case.
@AyrtonB I've implemented seed setting the way numpy developers recommend now in #15