sklearn.datasets.make_classification modifies its weights input. #9865
sklearn.datasets.make_classification modifies its weights parameters. Rude!
Steps/Code to Reproduce
weights is modified. Should be copied
Above assert is hit.
The text was updated successfully, but these errors were encountered:
If the caller assumes the weight list is not modified, perhaps wanting pass it to other functions or print it to the user, they’ll be very very sorry. Generally speaking, its a poor practice to modify inputs to a function. A better programming practice that leads to fewer bugs is to make procedures pure functions of their inputs - returning only the result and having no other side effects.…
On Wed, Oct 4, 2017 at 9:31 PM Joydeep Bhattacharjee < ***@***.***> wrote: Sorry if this is a silly question, but I am not able to understand why is this an issue. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#9865 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AHcErKPvIQKPz4WxcV-yXZ9lGla5vnfRks5spFuIgaJpZM4PrZcb> .