Comments (1)
There's definitely some erroring paths in log
. I wasn't able to produce the errors from your investigation with JET, but I was able to produce this one:
julia> using LinearAlgebra
julia> [NaN 0.0; 0.0 0.0] |> UpperTriangular
2×2 UpperTriangular{Float64, Matrix{Float64}}:
NaN 0.0
⋅ 0.0
julia> [NaN 0.0; 0.0 0.0] |> UpperTriangular |> log
ERROR: InexactError: Float64(NaN + NaN*im)
Stacktrace:
[1] Real
@ ./complex.jl:44 [inlined]
[2] convert
@ ./number.jl:7 [inlined]
[3] setindex!
@ ./array.jl:979 [inlined]
[4] setindex!
@ ~/julia/usr/share/julia/stdlib/v1.12/LinearAlgebra/src/triangular.jl:286 [inlined]
[5] _pow_superdiag_quasitriu!(A::UpperTriangular{Float64, Matrix{…}}, A0::UpperTriangular{Float64, Matrix{…}}, p::Float64)
@ LinearAlgebra ~/julia/usr/share/julia/stdlib/v1.12/LinearAlgebra/src/triangular.jl:2088
[6] _log_quasitriu!(A0::UpperTriangular{Float64, Matrix{Float64}}, A::UpperTriangular{Float64, Matrix{Float64}})
@ LinearAlgebra ~/julia/usr/share/julia/stdlib/v1.12/LinearAlgebra/src/triangular.jl:1816
[7] log_quasitriu(A0::UpperTriangular{Float64, Matrix{Float64}})
@ LinearAlgebra ~/julia/usr/share/julia/stdlib/v1.12/LinearAlgebra/src/triangular.jl:1798
[8] log
@ ~/julia/usr/share/julia/stdlib/v1.12/LinearAlgebra/src/triangular.jl:1779 [inlined]
[9] |>(x::UpperTriangular{Float64, Matrix{Float64}}, f::typeof(log))
@ Base ./operators.jl:967
[10] top-level scope
@ REPL[38]:1
Some type information was truncated. Use `show(err)` to see complete types.
Being unfamiliar with the math involved here and the docs not mentioning anything about NaN
in the input matrix, I have no idea whether that is intended though :/ At the very least, it's a hard-to-diagnose/reconcile error.
Here's the fuzzing setup that found this:
julia> using Supposition, LinearAlgebra
julia> square_mats = Data.SquareMatrices(Data.Floats{Float64}(); max_size=20) # upcoming Possibility in the next release
Supposition.Data.SquareMatrices(Supposition.Data.Vectors(Supposition.Data.Floats{Float64}(; nans=true, infs=true); min_size=0, max_size=400); min_size=0, max_size=20)
julia> mats = map(UpperTriangular, square_mats);
julia> @check db=false (m=mats) -> log(m) isa UpperTriangular
Encountered an error
Context: ##SuppositionAnon#646
Arguments:
m::UpperTriangular{Float64, Matrix{Float64}} = [NaN 0.0; 0.0 0.0]
Exception:
Message:
InexactError: Float64(NaN + NaN*im)
If I catch that InexactError
, the test passes even when I crank it up to 1_000_000 examples. The same goes for disabling NaN
in the generation of data.
from julia.
Related Issues (20)
- In-place `circshift!(arr, shifts)`
- Define `nextind(x, i::Integer)` or document existing methods HOT 1
- `sum(I -> A[I], CartesianIndices(A); dims=1)` needs initial value in order to work
- Segfault when loading conflicting `@ccallable` names from multiple pkgimages
- Slow type inference
- Should `==` over `ComposedFunction` support `missing` as usual HOT 6
- Source build of 1.12.0 on macOS ARM: `1cd47c3094` breaks JuliaInterpreter and Revise HOT 2
- Error entering Pkg mode when loading a "custom" REPL (`"deadlock detected in loading REPLExt -> REPLExt"`)
- breaking change in `names`
- return type inference, given abstract argument type, takes a long, maybe unbounded, time HOT 3
- `Base.active_module()` design is very badly broken on master
- Pkg.REPLExt is not safe to load multithreaded
- Autocompletion triggers error in invalid `AbstractDict`
- Foo{T >: Int} gives ERROR: UndefVarError: `T` not defined HOT 5
- Double counting test broken on i686-linux
- JET linting error from `wrap` on `Array` (on 1.11) HOT 2
- Add `strict` mechanism for opting into stricter subsets of the language HOT 1
- `UnionAll`s with trivial bodies ignore type lower bounds? HOT 2
- RFC: Export versioning
- auto-completion doesn't work correctly in pkg mode
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from julia.