ruby-numo / numo-narray

Ruby/Numo::NArray - New NArray class library
http://ruby-numo.github.io/narray/
BSD 3-Clause "New" or "Revised" License
418 stars 42 forks source link

Refactoring code to address style issues #114

Closed chills42 closed 2 years ago

chills42 commented 6 years ago

This is primarily focused on readability, but as a side effect some of the changes should additionally increase performance.

Running the tests before and after the change, I experienced an improvement in test speed of about 4.5%. This may or may not show in real world testing, but it does indicate that there is not a decrease in performance while adjusting style to be more standard.

kojix2 commented 6 years ago

Hello. It is a wonderful job! By the way I will ask you a strange question. Please tell me the truth. Are you human? Or are you a wonderful bot? Mr. Tanaka is a humble human. Even if you are a RuboCop addicting bot, Professor Tanaka will reply sincerely.

chills42 commented 6 years ago

Thanks! And yes, definitely human, just thought I'd help out a bit since I've started using the project recently and like it.

kojix2 commented 6 years ago

I'm sorry I suspect you are a bot. Now I know you are acting in good faith.

I think that the coding style of the Numo project should be left to Mr. Tanaka.

There are many wonderful programmers in this world. Mr. Tanaka create a great matrix library for Ruby. I am not good at computer and mathematics, but, I still understand that his work is amazing.

His style should be respected.

mrkn commented 5 years ago

@chills42 Can you extract just the essential changes that let test speed improve?

Applying rubocop rule is meaningless for numo-narray, but improving test speed is very valuable. IMHO, A new pull-request with the smallest changeset is wanted for that purpose.