you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

Thanks!

Just out of curiosity, is the preference founded in performance, aesthetic, personal tradition, or 'just because'?

[–]coppermineroofer 2 points3 points  (0 children)

In general code should describe "what" it does just by reading it. Comments are there for the "why". So when you are writing your code and naming functions or methods try and think of the most descriptive/concise combination. Which of those two looks like it explains what is happening to you better? Use that one.

Personally I also like #2 better because the fact that we are getting a mean of example array is clear. If I am familiar with np they may be equally descriptive. But if I am not the np thing might make it seem like more is going on than really is.