@@ -185,6 +185,9 @@ for (Typ, funcs, func) in ((:Zeros, :zeros, :zero), (:Ones, :ones, :one))
185
185
@inline $ Typ {T} (sz:: SZ ) where SZ<: Tuple{Vararg{Any,N}} where {T, N} = $ Typ {T, N} (sz)
186
186
@inline $ Typ (sz:: Vararg{Any,N} ) where N = $ Typ {Float64,N} (sz)
187
187
@inline $ Typ (sz:: SZ ) where SZ<: Tuple{Vararg{Any,N}} where N = $ Typ {Float64,N} (sz)
188
+ @inline $ Typ {T} (n:: Integer ) where T = $ Typ {T,1} (n)
189
+ @inline $ Typ (n:: Integer ) = $ Typ {Float64,1} (n)
190
+
188
191
189
192
@inline $ Typ {T,N} (A:: AbstractArray{V,N} ) where {T,V,N} = $ Typ {T,N} (size (A))
190
193
@inline $ Typ {T} (A:: AbstractArray ) where {T} = $ Typ {T} (size (A))
@@ -287,8 +290,11 @@ const RectOrDiagonal{T,V,Axes} = Union{RectDiagonal{T,V,Axes}, Diagonal{T,V}}
287
290
const SquareEye{T,Axes} = Diagonal{T,Ones{T,1 ,Tuple{Axes}}}
288
291
const Eye{T,Axes} = RectOrDiagonal{T,Ones{T,1 ,Tuple{Axes}}}
289
292
290
- Eye {T} (n:: Integer ) where T = Diagonal (Ones {T} (n))
291
- Eye (n:: Integer ) = Diagonal (Ones (n))
293
+ @inline SquareEye {T} (n:: Integer ) where T = Diagonal (Ones {T} (n))
294
+ @inline SquareEye (n:: Integer ) = Diagonal (Ones (n))
295
+
296
+ @inline Eye {T} (n:: Integer ) where T = Diagonal (Ones {T} (n))
297
+ @inline Eye (n:: Integer ) = Diagonal (Ones (n))
292
298
293
299
# function iterate(iter::Eye, istate = (1, 1))
294
300
# (i::Int, j::Int) = istate
0 commit comments