👀 Reading hidden code
Activating new project at `/tmp/jl_p3OZNA` Updating registry at `~/.julia/registries/General.toml` Resolving package versions... Installed ConstructionBase ─ v1.5.8 Installed GPUArraysCore ──── v0.1.6 Installed StructArrays ───── v0.6.18 Installed StaticArraysCore ─ v1.4.3 Installed Adapt ──────────── v4.2.0 Installed StaticArrays ───── v1.9.13 Updating `/tmp/jl_p3OZNA/Project.toml` [09ab397b] + StructArrays v0.6.18 Updating `/tmp/jl_p3OZNA/Manifest.toml` [79e6a3ab] + Adapt v4.2.0 [187b0558] + ConstructionBase v1.5.8 [9a962f9c] + DataAPI v1.16.0 [e2d170a0] + DataValueInterfaces v1.0.0 [46192b85] + GPUArraysCore v0.1.6 [82899510] + IteratorInterfaceExtensions v1.0.0 [bac558e1] + OrderedCollections v1.8.0 [aea7be01] + PrecompileTools v1.2.1 [21216c6a] + Preferences v1.4.3 [ae029012] + Requires v1.3.1 [90137ffa] + StaticArrays v1.9.13 [1e83bf80] + StaticArraysCore v1.4.3 [09ab397b] + StructArrays v0.6.18 [3783bdb8] + TableTraits v1.0.1 [bd369af6] + Tables v1.12.0 [56f22d72] + Artifacts [ade2ca70] + Dates [8f399da3] + Libdl [37e2e46d] + LinearAlgebra [de0858da] + Printf [9a3f8284] + Random [ea8e919c] + SHA [9e88b42a] + Serialization [2f01184e] + SparseArrays [10745b16] + Statistics [fa267f1f] + TOML [cf7118a7] + UUIDs [4ec0a83e] + Unicode [e66e0078] + CompilerSupportLibraries_jll [4536629a] + OpenBLAS_jll [8e850b90] + libblastrampoline_jll Precompiling project... ✓ CompilerSupportLibraries_jll ✓ Adapt ✓ StaticArraysCore ✓ ConstructionBase ✓ OpenBLAS_jll ✓ GPUArraysCore ✓ libblastrampoline_jll ✓ StaticArrays ✓ StructArrays 9 dependencies successfully precompiled in 7 seconds (9 already precompiled)
👀 Reading hidden code
using .PlutoRunner.Tables
👀 Reading hidden code
Enter cell code...
2×2 StructArray(::Matrix{Float64}, ::Matrix{Float64}) with eltype ComplexF64:
0.253725+0.493641im 0.949906+0.240513im
0.973359+0.661753im 0.0542274+0.911666im
👀 Reading hidden code
s = StructArray{ComplexF64}((rand(2,2), rand(2,2)))
quote
#= /home/runner/work/disorganised-mess/disorganised-mess/tables/structarrays.jl#==#0a4e7630-2350-11eb-3617-2fab5439a1f8:1 =#
true && (view)(a, 1:2)
end
👀 Reading hidden code
macroexpand(Main, quote @view a[1:2] end)
Column1 | Column2 | Column3 | Column4 | Column5 | Column6 | Column7 | Column8 | ||||
---|---|---|---|---|---|---|---|---|---|---|---|
Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | ||||
1 | 0.0224104 | 0.626141 | 0.705631 | 0.0277181 | 0.166051 | 0.251483 | 0.969934 | 0.793859 | |||
2 | 0.863897 | 0.0178973 | 0.190555 | 0.988322 | 0.323614 | 0.992751 | 0.949578 | 0.638692 | |||
3 | 0.412779 | 0.01478 | 0.823216 | 0.735826 | 0.219483 | 0.812801 | 0.627227 | 0.783774 | |||
4 | 0.217587 | 0.205335 | 0.706023 | 0.861281 | 0.56263 | 0.104691 | 0.491328 | 0.341069 | |||
5 | 0.0808613 | 0.382978 | 0.0301538 | 0.113368 | 0.746388 | 0.806647 | 0.668848 | 0.183771 | |||
6 | 0.0154356 | 0.0725448 | 0.453642 | 0.675574 | 0.817269 | 0.511067 | 0.753238 | 0.101485 | |||
7 | 0.225465 | 0.175325 | 0.615306 | 0.873884 | 0.234308 | 0.0725932 | 0.365552 | 0.31235 | |||
8 | 0.145574 | 0.597777 | 0.911488 | 0.21148 | 0.32492 | 0.704629 | 0.867326 | 0.78181 | |||
9 | 0.462694 | 0.209176 | 0.419049 | 0.453084 | 0.534379 | 0.94828 | 0.520784 | 0.115243 | |||
10 | 0.369344 | 0.35821 | 0.242618 | 0.103198 | 0.912522 | 0.833921 | 0.48052 | 0.847757 | |||
t = Tables.table(rand(400,400))
👀 Reading hidden code
true
hasmethod(view, (typeof([1,2,3]), typeof(1:3)))
👀 Reading hidden code
1:100
a = 1:100
👀 Reading hidden code
MethodError: no method matching getindex(::Tables.MatrixTable{Matrix{Float64}}, ::UnitRange{Int64})
Closest candidates are:
getindex(::Union{Tables.AbstractColumns, Tables.AbstractRow}, ::Symbol) at ~/.julia/packages/Tables/8p03y/src/Tables.jl:185
getindex(::Union{Tables.AbstractColumns, Tables.AbstractRow}, ::Int64) at ~/.julia/packages/Tables/8p03y/src/Tables.jl:184
Here is what happened, the most recent locations are first:
- tryview
(x::Tables.MatrixTable{Matrix{Float64}}, idx::UnitRange{Int64}) from Other cell: line 5view(x, idx...)
else
getindex(x, idx...)
end
end
- Show more...
tryview(t, 5:6)
👀 Reading hidden code
0.705631
0.190555
0.823216
0.706023
0.0301538
0.453642
0.615306
0.911488
0.419049
0.242618
0.214734
0.417522
0.480089
0.68045
0.163384
0.461743
0.628997
0.683859
0.321186
0.0653255
0.432525
0.400391
0.0615686
0.970581
0.0346344
0.999458
0.232294
0.329384
0.860764
0.57316
t[3]
👀 Reading hidden code
tryview (generic function with 1 method)
function tryview(x::T, idx...) where T
if hasmethod(view, (T, typeof.(idx)...))
view(x, idx...)
else
getindex(x, idx...)
end
end
👀 Reading hidden code