Universal function methods

How can functions have methods? As we said earlier, universal functions are not functions but objects representing functions. Universal functions have four methods. They only make sense for functions such as add. That is, they have two input parameters and return one output parameter. If the signature of an ufunc does not match this condition, this will result in a ValueError , so call this method only for binary universal functions. The four methods are listed as follows:

  • reduce
  • accumulate
  • reduceat
  • outer
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.91.44