ruby-numo / numo-narray

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

Define ! operator as an alias of Numo::NArray#inplace #126

Open masa16 opened 5 years ago

masa16 commented 5 years ago
a.inplace + 1

is equivalent to

!a + 1

Any problem?

kojix2 commented 5 years ago

!!

sonots commented 5 years ago

I've recently talked with matz. We are thinking to

  1. If += method is defined, call it
  2. Define +! operator newly

etc

sonots commented 5 years ago

!a looks like returning boolean value

naitoh commented 5 years ago

I agree. > !a looks like returning boolean value

masa16 commented 5 years ago

I see. I leave this issue just an idea.