You're right, `1` makes no sense. The division by 0 yields nan only if the value in the array are 0, otherwise it is `+/-inf`. Is it acceptable ?