@@ -2866,11 +2866,6 @@ def vecdot(
2866
2866
out : ndarray
2867
2867
The vector dot product of the inputs computed along the specified axes.
2868
2868
2869
- Raises
2870
- ------
2871
- ValueError
2872
- If either input is a scalar value.
2873
-
2874
2869
Notes
2875
2870
-----
2876
2871
This is similar to `dot` but with broadcasting. It computes the dot product
@@ -2880,9 +2875,6 @@ def vecdot(
2880
2875
x1 = as_tensor_variable (x1 )
2881
2876
x2 = as_tensor_variable (x2 )
2882
2877
2883
- if x1 .type .ndim == 0 or x2 .type .ndim == 0 :
2884
- raise ValueError ("vecdot operand cannot be scalar" )
2885
-
2886
2878
# Handle negative axis
2887
2879
if axis < 0 :
2888
2880
x1_axis = axis % x1 .type .ndim
@@ -2928,12 +2920,6 @@ def matvec(x1: "ArrayLike", x2: "ArrayLike", dtype: Optional["DTypeLike"] = None
2928
2920
out : ndarray
2929
2921
The matrix-vector product with shape (..., M).
2930
2922
2931
- Raises
2932
- ------
2933
- ValueError
2934
- If any input is a scalar or if the trailing dimension of x2 does not match
2935
- the second-to-last dimension of x1.
2936
-
2937
2923
Notes
2938
2924
-----
2939
2925
This is similar to `matmul` where the second argument is a vector,
@@ -2943,15 +2929,6 @@ def matvec(x1: "ArrayLike", x2: "ArrayLike", dtype: Optional["DTypeLike"] = None
2943
2929
x1 = as_tensor_variable (x1 )
2944
2930
x2 = as_tensor_variable (x2 )
2945
2931
2946
- if x1 .type .ndim == 0 or x2 .type .ndim == 0 :
2947
- raise ValueError ("matvec operand cannot be scalar" )
2948
-
2949
- if x1 .type .ndim < 2 :
2950
- raise ValueError ("First input to matvec must have at least 2 dimensions" )
2951
-
2952
- if x2 .type .ndim < 1 :
2953
- raise ValueError ("Second input to matvec must have at least 1 dimension" )
2954
-
2955
2932
out = _matrix_vec_prod (x1 , x2 )
2956
2933
2957
2934
if dtype is not None :
@@ -2979,12 +2956,6 @@ def vecmat(x1: "ArrayLike", x2: "ArrayLike", dtype: Optional["DTypeLike"] = None
2979
2956
out : ndarray
2980
2957
The vector-matrix product with shape (..., N).
2981
2958
2982
- Raises
2983
- ------
2984
- ValueError
2985
- If any input is a scalar or if the last dimension of x1 does not match
2986
- the second-to-last dimension of x2.
2987
-
2988
2959
Notes
2989
2960
-----
2990
2961
This is similar to `matmul` where the first argument is a vector,
@@ -2994,15 +2965,6 @@ def vecmat(x1: "ArrayLike", x2: "ArrayLike", dtype: Optional["DTypeLike"] = None
2994
2965
x1 = as_tensor_variable (x1 )
2995
2966
x2 = as_tensor_variable (x2 )
2996
2967
2997
- if x1 .type .ndim == 0 or x2 .type .ndim == 0 :
2998
- raise ValueError ("vecmat operand cannot be scalar" )
2999
-
3000
- if x1 .type .ndim < 1 :
3001
- raise ValueError ("First input to vecmat must have at least 1 dimension" )
3002
-
3003
- if x2 .type .ndim < 2 :
3004
- raise ValueError ("Second input to vecmat must have at least 2 dimensions" )
3005
-
3006
2968
out = _vec_matrix_prod (x1 , x2 )
3007
2969
3008
2970
if dtype is not None :
0 commit comments