Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement logical indexing #120

Closed
JeffBezanson opened this issue Jul 15, 2011 · 2 comments
Closed

implement logical indexing #120

JeffBezanson opened this issue Jul 15, 2011 · 2 comments

Comments

@JeffBezanson
Copy link
Member

e.g. a[a>1]

@ghost ghost assigned ViralBShah Jul 15, 2011
@ghost ghost assigned GeorgeXing Dec 25, 2011
@JeffBezanson
Copy link
Member Author

Moving the rest of the functionality to 1.1, if ever.

JeffBezanson added a commit that referenced this issue May 28, 2012
@JeffBezanson
Copy link
Member Author

@carlobaldassi finished this in commit c9cbbb1.

cmcaine pushed a commit to cmcaine/julia that referenced this issue Sep 24, 2020
Add 'math' topic to relevant exercises in track config
LilithHafner pushed a commit to LilithHafner/julia that referenced this issue Oct 11, 2021
Keno pushed a commit that referenced this issue Oct 9, 2023
only do the getfield optimization when it is safe
jishnub added a commit that referenced this issue Jun 4, 2024
Similar to #54631, this would
help reduce dynamic dispatches involved in concatenating a `String` and
a `LazyString`.

These show up in
```julia
julia> @report_opt Tridiagonal(rand(1), rand(2), rand(1)) \ rand(2)
[ Info: tracking Base
┌ Warning: skipping var"#sprint#594"(context, sizehint::Integer, ::typeof(sprint), f::Function, args...) @ Base strings/io.jl:107 to avoid parsing too much code
└ @ Revise ~/.julia/packages/Revise/bAgL0/src/packagedef.jl:1092
┌ Warning: skipping (::Base.var"#120#121")(io) @ Base strings/lazy.jl:84 to avoid parsing too much code
└ @ Revise ~/.julia/packages/Revise/bAgL0/src/packagedef.jl:1092
═════ 1 possible error found ═════
┌ \(A::Tridiagonal{Float64, Vector{Float64}}, B::Vector{Float64}) @ LinearAlgebra /cache/build/builder-amdci4-5/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/LinearAlgebra/src/generic.jl:1132
│┌ lu(::Tridiagonal{Float64, Vector{Float64}}) @ LinearAlgebra /cache/build/builder-amdci4-5/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/LinearAlgebra/src/lu.jl:341
││┌ lu(::Tridiagonal{Float64, Vector{Float64}}; kwargs::@kwargs{}) @ LinearAlgebra /cache/build/builder-amdci4-5/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/LinearAlgebra/src/lu.jl:341
│││┌ _lucopy(A::Tridiagonal{Float64, Vector{Float64}}, T::Type{Float64}) @ LinearAlgebra /cache/build/builder-amdci4-5/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/LinearAlgebra/src/lu.jl:351
││││┌ copymutable_oftype(A::Tridiagonal{Float64, Vector{Float64}}, ::Type{Float64}) @ LinearAlgebra /cache/build/builder-amdci4-5/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/LinearAlgebra/src/LinearAlgebra.jl:463
│││││┌ similar(M::Tridiagonal{Float64, Vector{Float64}}, ::Type{Float64}) @ LinearAlgebra /cache/build/builder-amdci4-5/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/LinearAlgebra/src/tridiag.jl:603
││││││┌ Tridiagonal(dl::Vector{Float64}, d::Vector{Float64}, du::Vector{Float64}) @ LinearAlgebra /cache/build/builder-amdci4-5/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/LinearAlgebra/src/tridiag.jl:520
│││││││┌ Tridiagonal{Float64, Vector{Float64}}(dl::Vector{Float64}, d::Vector{Float64}, du::Vector{Float64}) @ LinearAlgebra /cache/build/builder-amdci4-5/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/LinearAlgebra/src/tridiag.jl:477
││││││││┌ string(::String, ::String, ::LazyString) @ Base ./strings/io.jl:189
│││││││││┌ print_to_string(::String, ::String, ::LazyString) @ Base ./strings/io.jl:148
││││││││││┌ print(io::IOBuffer, s::LazyString) @ Base ./strings/io.jl:195
│││││││││││┌ iterate(s::LazyString) @ Base ./strings/lazy.jl:94
││││││││││││┌ String(l::LazyString) @ Base ./strings/lazy.jl:83
│││││││││││││┌ sprint(::Base.var"#120#121"{LazyString}) @ Base ./strings/io.jl:107
││││││││││││││┌ sprint(::Base.var"#120#121"{LazyString}; context::Nothing, sizehint::Int64) @ Base ./strings/io.jl:114
│││││││││││││││┌ (::Base.var"#120#121"{LazyString})(io::IOBuffer) @ Base ./strings/lazy.jl:85
││││││││││││││││ runtime dispatch detected: print(io::IOBuffer, %16::Any)::Any
│││││││││││││││└────────────────────
```

Co-authored-by: Shuhei Kadowaki <[email protected]>
Co-authored-by: Dilum Aluthge <[email protected]>
KristofferC pushed a commit that referenced this issue Jun 4, 2024
Similar to #54631, this would
help reduce dynamic dispatches involved in concatenating a `String` and
a `LazyString`.

These show up in
```julia
julia> @report_opt Tridiagonal(rand(1), rand(2), rand(1)) \ rand(2)
[ Info: tracking Base
┌ Warning: skipping var"#sprint#594"(context, sizehint::Integer, ::typeof(sprint), f::Function, args...) @ Base strings/io.jl:107 to avoid parsing too much code
└ @ Revise ~/.julia/packages/Revise/bAgL0/src/packagedef.jl:1092
┌ Warning: skipping (::Base.var"#120#121")(io) @ Base strings/lazy.jl:84 to avoid parsing too much code
└ @ Revise ~/.julia/packages/Revise/bAgL0/src/packagedef.jl:1092
═════ 1 possible error found ═════
┌ \(A::Tridiagonal{Float64, Vector{Float64}}, B::Vector{Float64}) @ LinearAlgebra /cache/build/builder-amdci4-5/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/LinearAlgebra/src/generic.jl:1132
│┌ lu(::Tridiagonal{Float64, Vector{Float64}}) @ LinearAlgebra /cache/build/builder-amdci4-5/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/LinearAlgebra/src/lu.jl:341
││┌ lu(::Tridiagonal{Float64, Vector{Float64}}; kwargs::@kwargs{}) @ LinearAlgebra /cache/build/builder-amdci4-5/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/LinearAlgebra/src/lu.jl:341
│││┌ _lucopy(A::Tridiagonal{Float64, Vector{Float64}}, T::Type{Float64}) @ LinearAlgebra /cache/build/builder-amdci4-5/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/LinearAlgebra/src/lu.jl:351
││││┌ copymutable_oftype(A::Tridiagonal{Float64, Vector{Float64}}, ::Type{Float64}) @ LinearAlgebra /cache/build/builder-amdci4-5/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/LinearAlgebra/src/LinearAlgebra.jl:463
│││││┌ similar(M::Tridiagonal{Float64, Vector{Float64}}, ::Type{Float64}) @ LinearAlgebra /cache/build/builder-amdci4-5/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/LinearAlgebra/src/tridiag.jl:603
││││││┌ Tridiagonal(dl::Vector{Float64}, d::Vector{Float64}, du::Vector{Float64}) @ LinearAlgebra /cache/build/builder-amdci4-5/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/LinearAlgebra/src/tridiag.jl:520
│││││││┌ Tridiagonal{Float64, Vector{Float64}}(dl::Vector{Float64}, d::Vector{Float64}, du::Vector{Float64}) @ LinearAlgebra /cache/build/builder-amdci4-5/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/LinearAlgebra/src/tridiag.jl:477
││││││││┌ string(::String, ::String, ::LazyString) @ Base ./strings/io.jl:189
│││││││││┌ print_to_string(::String, ::String, ::LazyString) @ Base ./strings/io.jl:148
││││││││││┌ print(io::IOBuffer, s::LazyString) @ Base ./strings/io.jl:195
│││││││││││┌ iterate(s::LazyString) @ Base ./strings/lazy.jl:94
││││││││││││┌ String(l::LazyString) @ Base ./strings/lazy.jl:83
│││││││││││││┌ sprint(::Base.var"#120#121"{LazyString}) @ Base ./strings/io.jl:107
││││││││││││││┌ sprint(::Base.var"#120#121"{LazyString}; context::Nothing, sizehint::Int64) @ Base ./strings/io.jl:114
│││││││││││││││┌ (::Base.var"#120#121"{LazyString})(io::IOBuffer) @ Base ./strings/lazy.jl:85
││││││││││││││││ runtime dispatch detected: print(io::IOBuffer, %16::Any)::Any
│││││││││││││││└────────────────────
```

Co-authored-by: Shuhei Kadowaki <[email protected]>
Co-authored-by: Dilum Aluthge <[email protected]>
(cherry picked from commit 770a464)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants