Skip to content

Commit 8a4bba3

Browse files
JakobAsslaenderdpo
authored andcommitted
Remove shape function (duplicate of size)
1 parent f39deaa commit 8a4bba3

File tree

4 files changed

+2
-13
lines changed

4 files changed

+2
-13
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ Function | Description
7474
`hermitian` | Determine whether the operator is Hermitian
7575
`push!` | For L-BFGS or L-SR1 operators, push a new pair {s,y}
7676
`reset!` | For L-BFGS or L-SR1 operators, reset the data
77-
`shape` | Return the size of a linear operator
7877
`show` | Display basic information about an operator
7978
`size` | Return the size of a linear operator
8079
`symmetric` | Determine whether the operator is symmetric

docs/src/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ Function | Description
5151
`hermitian` | Determine whether the operator is Hermitian
5252
`push!` | For L-BFGS or L-SR1 operators, push a new pair {s,y}
5353
`reset!` | For L-BFGS or L-SR1 operators, reset the data
54-
`shape` | Return the size of a linear operator
5554
`show` | Display basic information about an operator
5655
`size` | Return the size of a linear operator
5756
`symmetric` | Determine whether the operator is symmetric

src/abstract.jl

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ export AbstractLinearOperator,
1212
nprod,
1313
ntprod,
1414
nctprod,
15-
reset!,
16-
shape
15+
reset!
1716

1817
mutable struct LinearOperatorException <: Exception
1918
msg::AbstractString
@@ -210,13 +209,6 @@ function size(op::AbstractLinearOperator, d::Integer)
210209
throw(LinearOperatorException("Linear operators only have 2 dimensions for now"))
211210
end
212211

213-
"""
214-
m, n = shape(op)
215-
216-
An alias for size.
217-
"""
218-
shape(op::AbstractLinearOperator) = size(op)
219-
220212
"""
221213
ishermitian(op)
222214

test/test_linop.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ function test_linop()
2020

2121
@testset "Size" begin
2222
@test(size(op) == (nrow, ncol))
23-
@test(shape(op) == (nrow, ncol))
2423
@test(size(op, 1) == nrow)
2524
@test(size(op, 2) == ncol)
2625
@test_throws LinearOperatorException size(op, 3)
@@ -676,7 +675,7 @@ function test_linop()
676675
for _ = 1:nctprods
677676
op' * rand(3)
678677
end
679-
for fn (:size, :shape, :issymmetric, :ishermitian, :nprod, :ntprod, :nctprod)
678+
for fn (:size, :issymmetric, :ishermitian, :nprod, :ntprod, :nctprod)
680679
@eval begin
681680
@test $fn($top) == $fn($top.op)
682681
end

0 commit comments

Comments
 (0)