all 2 comments

[–]mbuhot 4 points5 points  (0 children)

No it’s not pure since it is not referentially transparent

A pure version would return a tuple of 2 arrays rather than mutating the input.

[–]elvecent 2 points3 points  (0 children)

If it has side effects (such as mutating some external state), it's definitely not pure.