lmas / opensimplex

This repo has been migrated to https://code.larus.se/lmas/opensimplex
MIT License
241 stars 29 forks source link

Updating _noise2a and _noise4a to output multidimensional arrays #25

Closed DanielShrimpton closed 2 years ago

DanielShrimpton commented 2 years ago

Updating the _noise2a and _noise4a (noticed another pull request for _noise3a so have omitted in this) functions to output a multidimensional array. Given the inputs are numpy arrays of indices/coordinates then it will iterate over them, constructing a multidimensional array of the generated noise, like in the example code supplied in the repo. Have also added some docstrings and typehints in the functions.

lmas commented 2 years ago

Hi thank you for this. Would you mind remove the docstring from the _noiseXarray funcs? They're not ment to be used directly so it's just confusing letting them have docstrings.

Otherwise it looks good and clean!

DanielShrimpton commented 2 years ago

Hi no worries, just to confirm, do you mean to remove the docstring from the functions in the class (noiseXarray) or the private ones in the file that the class functions point to (_noiseXa)? Sorry I get what you mean, will do that now

lmas commented 2 years ago

Whoops misstyped. Only the private ones (_noiseXa).

-- Alex

On Sun, 30 Jan 2022, at 14:09, Daniel Shrimpton wrote:

Hi no worries, just to confirm, do you mean to remove the docstring from the functions in the class (noiseXarray) or the private ones in the file that the class functions point to (_noiseXa)?

— Reply to this email directly, view it on GitHub https://github.com/lmas/opensimplex/pull/25#issuecomment-1025140293, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBDCXNDSWBFBLXEQ5HXBM3UYUZ7LANCNFSM5NDAB5OQ. You are receiving this because you commented.Message ID: @.***>

DanielShrimpton commented 2 years ago

I have removed the docstrings from the private functions :)

lmas commented 2 years ago

Nice thanks man. Holding off pulling for now, need to wait for a reply on the other PR.

-- Alex

On Sun, 30 Jan 2022, at 14:14, Daniel Shrimpton wrote:

I have removed the docstrings from the private functions :)

— Reply to this email directly, view it on GitHub https://github.com/lmas/opensimplex/pull/25#issuecomment-1025141124, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBDCXME54YBFGBGHFHP5QTUYU2TXANCNFSM5NDAB5OQ. You are receiving this because you commented.Message ID: @.***>

DanielShrimpton commented 2 years ago

Sure thing, no worries at all