[python-arrayfire] 68/250: Merge remote-tracking branch 'upstream/master' into cleanup

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Mar 28 22:59:32 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch debian/master
in repository python-arrayfire.

commit 9d6ab0b597b2626cbee593dc4d61b4929812a447
Merge: 948ff85 b0429c7
Author: Pavan Yalamanchili <pavan at arrayfire.com>
Date:   Thu Aug 27 18:41:05 2015 -0400

    Merge remote-tracking branch 'upstream/master' into cleanup

 arrayfire/arith.py | 4 ++--
 arrayfire/array.py | 4 ++--
 arrayfire/util.py  | 8 ++++++++
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --cc arrayfire/arith.py
index a9f942b,c06c4ef..9f8b3e4
--- a/arrayfire/arith.py
+++ b/arrayfire/arith.py
@@@ -25,15 -25,15 +25,15 @@@ def arith_binary_func(lhs, rhs, c_func)
  
      elif (is_number(rhs)):
          ldims = dim4_tuple(lhs.dims())
-         rty = number_dtype(rhs)
+         rty = implicit_dtype(rhs, lhs.type())
 -        other = array()
 +        other = Array()
          other.arr = constant_array(rhs, ldims[0], ldims[1], ldims[2], ldims[3], rty)
          safe_call(c_func(ct.pointer(out.arr), lhs.arr, other.arr, bcast.get()))
  
      else:
          rdims = dim4_tuple(rhs.dims())
-         lty = number_dtype(lhs)
+         lty = implicit_dtype(lhs, rhs.type())
 -        other = array()
 +        other = Array()
          other.arr = constant_array(lhs, rdims[0], rdims[1], rdims[2], rdims[3], lty)
          safe_call(c_func(ct.pointer(out.arr), other.arr, rhs.arr, bcast.get()))
  
diff --cc arrayfire/array.py
index 80b8bb9,99ff365..d0128c3
--- a/arrayfire/array.py
+++ b/arrayfire/array.py
@@@ -60,10 -60,10 +60,10 @@@ def binary_func(lhs, rhs, c_func)
  
      if (is_number(rhs)):
          ldims = dim4_tuple(lhs.dims())
-         rty = number_dtype(rhs)
+         rty = implicit_dtype(rhs, lhs.type())
 -        other = array()
 +        other = Array()
          other.arr = constant_array(rhs, ldims[0], ldims[1], ldims[2], ldims[3], rty)
 -    elif not isinstance(rhs, array):
 +    elif not isinstance(rhs, Array):
          raise TypeError("Invalid parameter to binary function")
  
      safe_call(c_func(ct.pointer(out.arr), lhs.arr, other.arr, bcast.get()))
@@@ -76,10 -76,10 +76,10 @@@ def binary_funcr(lhs, rhs, c_func)
  
      if (is_number(lhs)):
          rdims = dim4_tuple(rhs.dims())
-         lty = number_dtype(lhs)
+         lty = implicit_dtype(lhs, rhs.type())
 -        other = array()
 +        other = Array()
          other.arr = constant_array(lhs, rdims[0], rdims[1], rdims[2], rdims[3], lty)
 -    elif not isinstance(lhs, array):
 +    elif not isinstance(lhs, Array):
          raise TypeError("Invalid parameter to binary function")
  
      c_func(ct.pointer(out.arr), other.arr, rhs.arr, bcast.get())

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/python-arrayfire.git



More information about the debian-science-commits mailing list