# Latest

**URL:** https://discourse.julialang.org/latest.md?page=734

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 735

---

## [How to intercept creation or setting of variable in current module?](https://discourse.julialang.org/t/how-to-intercept-creation-or-setting-of-variable-in-current-module/97034)

<div class="topic-metadata">

**Author:** [@andrey2185](https://discourse.julialang.org/u/andrey2185)\
**Replies:** 7\
**Last updated:** [April 4, 2023, 7:29pm UTC](https://discourse.julialang.org/t/how-to-intercept-creation-or-setting-of-variable-in-current-module/97034 "2023-04-04T19:29:45Z")

</div>

Need help, how to intercept operation on create new variable on current module in Julia 1.8? For example, to intercept MyModule.x = 1 in Julia 1.8 i do this: julia\> module MyModule end; julia\> function Base.setpropert…

---

## [Optim search/convergence speed](https://discourse.julialang.org/t/optim-search-convergence-speed/97083)

<div class="topic-metadata">

**Author:** [@X\_Chen](https://discourse.julialang.org/u/X_Chen)\
**Replies:** 0\
**Last updated:** [April 4, 2023, 8:23pm UTC](https://discourse.julialang.org/t/optim-search-convergence-speed/97083 "2023-04-04T20:23:34Z")

</div>

Hello! I am using Optim.optimize to conduct a MLE algorithm with 6 parameters. The objective function is defined as follows: function r\_obj(r\_para) print(r\_para) df\_y\_1\_p\_0.LL\_1 = cap\_p.((r\_prob\_0(r\_para,df\_0.x3…

---

## [Subtract Vector from Vector of Vectors](https://discourse.julialang.org/t/subtract-vector-from-vector-of-vectors/96913)

<div class="topic-metadata">

**Author:** [@liamfdoherty](https://discourse.julialang.org/u/liamfdoherty)\
**Replies:** 6\
**Last updated:** [April 4, 2023, 7:34pm UTC](https://discourse.julialang.org/t/subtract-vector-from-vector-of-vectors/96913 "2023-04-04T19:34:39Z")

</div>

I’m having a bit of a moment. What is wrong with julia\> x = \[\[1, 2, 3\], \[4, 5, 6\]\] 2-element Vector{Vector{Int64}}: \[1, 2, 3\] \[4, 5, 6\] julia\> x .- \[1, 2, 3\] ERROR: DimensionMismatch: arrays could not be broadcast to …

---

## [April 6: A Conversation with Turing Award Winner Bob Metcalfe](https://discourse.julialang.org/t/april-6-a-conversation-with-turing-award-winner-bob-metcalfe/97079)

<div class="topic-metadata">

**Author:** [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Replies:** 0\
**Last updated:** [April 4, 2023, 6:43pm UTC](https://discourse.julialang.org/t/april-6-a-conversation-with-turing-award-winner-bob-metcalfe/97079 "2023-04-04T18:43:51Z")

</div>

Thursday, April 6th at 10:00 AM ET (US) JuliaHub is pleased to host a live conversation with Bob Metcalfe, 2023 Turing Award Winner, Father of the Ethernet, Founder of 3COM, and Research Affiliate in Computational Engi…

---

## [Julia packages organizations question](https://discourse.julialang.org/t/julia-packages-organizations-question/97027)

<div class="topic-metadata">

**Author:** [@Renan\_Rabelo](https://discourse.julialang.org/u/Renan_Rabelo)\
**Replies:** 7\
**Last updated:** [April 4, 2023, 6:08pm UTC](https://discourse.julialang.org/t/julia-packages-organizations-question/97027 "2023-04-04T18:08:38Z")

</div>

When I’m searching for packages on JuliaHub I see a lot of “Julia” authors like JuliaMaths, JuliaPlots, JuliaGraphs and so on. Are they “official” organizations? Does a list with all those organizations exists? Thank …

---

## [\`stacktrace()\` giving back wrong files for some of the frames](https://discourse.julialang.org/t/stacktrace-giving-back-wrong-files-for-some-of-the-frames/97075)

<div class="topic-metadata">

**Author:** [@ashton314](https://discourse.julialang.org/u/ashton314)\
**Replies:** 0\
**Last updated:** [April 4, 2023, 5:50pm UTC](https://discourse.julialang.org/t/stacktrace-giving-back-wrong-files-for-some-of-the-frames/97075 "2023-04-04T17:50:44Z")

</div>

Hi all! I’m noticing some odd behavior around collecting stack traces. When I call stacktrace() I get some frames that look like this: injectable\_region : /Users/ashton/.julia/dev/FloatTracker/src/Injector.jl:164 shou…

---

## [Eltype of structs containing true or false values](https://discourse.julialang.org/t/eltype-of-structs-containing-true-or-false-values/97024)

<div class="topic-metadata">

**Author:** [@Janssena](https://discourse.julialang.org/u/Janssena)\
**Replies:** 12\
**Last updated:** [April 4, 2023, 4:57pm UTC](https://discourse.julialang.org/t/eltype-of-structs-containing-true-or-false-values/97024 "2023-04-04T16:57:46Z")

</div>

Hey All, I am creating a struct and a corresponding iterable. I want to make the eltype of the iterable more specific but am running into an issue since part of the eltype of my struct is true / false: simple example: …

---

## [Pre-allocation for matrices / vectors of matrices of different length](https://discourse.julialang.org/t/pre-allocation-for-matrices-vectors-of-matrices-of-different-length/97071)

<div class="topic-metadata">

**Author:** [@Antomek](https://discourse.julialang.org/u/Antomek)\
**Replies:** 3\
**Last updated:** [April 4, 2023, 4:43pm UTC](https://discourse.julialang.org/t/pre-allocation-for-matrices-vectors-of-matrices-of-different-length/97071 "2023-04-04T16:43:29Z")

</div>

Hi all, I am doing a bunch of simulations, and I want to save the outcome of these N simulations My parameters for each simulation is a p of type Vector{Matrix{Float32}}, and there are M vectors X, Y that I’d like to …

---

## [A View of Post-Exascale Computational Science and the Emerging Mix of HPC, AI, and Quantum](https://discourse.julialang.org/t/a-view-of-post-exascale-computational-science-and-the-emerging-mix-of-hpc-ai-and-quantum/97065)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 0\
**Last updated:** [April 4, 2023, 2:25pm UTC](https://discourse.julialang.org/t/a-view-of-post-exascale-computational-science-and-the-emerging-mix-of-hpc-ai-and-quantum/97065 "2023-04-04T14:25:48Z")

</div>

Dell HPC event (dont worry - these are very technical and not sales talks) Wednesday 5th April 10 am CST

---

## [Expected "end" error while loading a module](https://discourse.julialang.org/t/expected-end-error-while-loading-a-module/97059)

<div class="topic-metadata">

**Author:** [@Sh\_166](https://discourse.julialang.org/u/Sh_166)\
**Replies:** 2\
**Last updated:** [April 4, 2023, 1:45pm UTC](https://discourse.julialang.org/t/expected-end-error-while-loading-a-module/97059 "2023-04-04T13:45:15Z")

</div>

I am having the following problem loading a module: LoadError: syntax: "module" at C:\\Users\\shiha\\LyapunovExponentsWithForwardDiff.jl:1 expected "end", got "LyapunovExponentsResult" in expression starting at C:\\Users\\sh…

---

## [UndefVarError: libcuda\_original\_version not defined](https://discourse.julialang.org/t/undefvarerror-libcuda-original-version-not-defined/97049)

<div class="topic-metadata">

**Author:** [@stephans3](https://discourse.julialang.org/u/stephans3)\
**Replies:** 1\
**Last updated:** [April 4, 2023, 12:33pm UTC](https://discourse.julialang.org/t/undefvarerror-libcuda-original-version-not-defined/97049 "2023-04-04T12:33:37Z")

</div>

Hi all, on a student’s laptop (with Nvidia P620, Windows 10) we installed CUDA.jl and faced the following error message. julia\> CUDA.versioninfo() CUDA runtime 12.1, artifact installation CUDA driver 12.1 NVIDIA driver…

---

## [What type to use for 2D arrays in ccall](https://discourse.julialang.org/t/what-type-to-use-for-2d-arrays-in-ccall/97060)

<div class="topic-metadata">

**Author:** [@Alseidon](https://discourse.julialang.org/u/Alseidon)\
**Replies:** 2\
**Last updated:** [April 4, 2023, 12:09pm UTC](https://discourse.julialang.org/t/what-type-to-use-for-2d-arrays-in-ccall/97060 "2023-04-04T12:09:11Z")

</div>

I am experimenting with calls to C functions, and got a bit puzzled when using multi-dimensional arrays as parameters. I have this bit of C code in cfile.c: void f(double array\[2\]\[2\]) { array\[1\]\[1\] = 42.; retur…

---

## [In GaussianProcess.jl it is throwing error if I choose \`MeanConst()\`](https://discourse.julialang.org/t/in-gaussianprocess-jl-it-is-throwing-error-if-i-choose-meanconst/97008)

<div class="topic-metadata">

**Author:** [@Sourish](https://discourse.julialang.org/u/Sourish)\
**Replies:** 9\
**Last updated:** [April 4, 2023, 12:08pm UTC](https://discourse.julialang.org/t/in-gaussianprocess-jl-it-is-throwing-error-if-i-choose-meanconst/97008 "2023-04-04T12:08:15Z")

</div>

Hi In the following code, I am trying to implement a constant mean function from GaussianProcesses.jl. But it is throwing an error stating no method matching MeanConst() using GaussianProcesses n = 100; x = 2π \* rand(n…

---

## [Can someone help me figure out how to arrange a package with the structure as in ITensors.jl?](https://discourse.julialang.org/t/can-someone-help-me-figure-out-how-to-arrange-a-package-with-the-structure-as-in-itensors-jl/89476)

<div class="topic-metadata">

**Author:** [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)\
**Replies:** 6\
**Last updated:** [April 4, 2023, 11:45am UTC](https://discourse.julialang.org/t/can-someone-help-me-figure-out-how-to-arrange-a-package-with-the-structure-as-in-itensors-jl/89476 "2023-04-04T11:45:18Z")

</div>

I want to split plotting functionality (which depends on Plots or Makie) from my main package to reduce loading time. I notice that ITensors.jl does the exact thing I want to do. But I have difficulty on how it works. Fo…

---

## [NLSolver speed](https://discourse.julialang.org/t/nlsolver-speed/97057)

<div class="topic-metadata">

**Author:** [@larsudb](https://discourse.julialang.org/u/larsudb)\
**Replies:** 0\
**Last updated:** [April 4, 2023, 10:20am UTC](https://discourse.julialang.org/t/nlsolver-speed/97057 "2023-04-04T10:20:38Z")

</div>

I have written a code for a lid-driven square cavity within gridap and am wondering if the solve time can be decreased easily. using Gridap using LineSearches: BackTracking using TickTock using WriteVTK n = 100 dom…

---

## [Forward Diff and Matrix Operations](https://discourse.julialang.org/t/forward-diff-and-matrix-operations/97042)

<div class="topic-metadata">

**Author:** [@JHall](https://discourse.julialang.org/u/JHall)\
**Replies:** 2\
**Last updated:** [April 4, 2023, 9:29am UTC](https://discourse.julialang.org/t/forward-diff-and-matrix-operations/97042 "2023-04-04T09:29:10Z")

</div>

Hi all, I am new to ForwardDiff and coding up a simple example of minimum distance estimation. I would ideally like to be able to set up the problem in the traditional way of: \[distance between parameter implied momen…

---

## [Distributions fit\_mle of distribution type vs distributions with parameters](https://discourse.julialang.org/t/distributions-fit-mle-of-distribution-type-vs-distributions-with-parameters/75228)

<div class="topic-metadata">

**Author:** [@dmetivie](https://discourse.julialang.org/u/dmetivie)\
**Replies:** 6\
**Last updated:** [April 4, 2023, 8:53am UTC](https://discourse.julialang.org/t/distributions-fit-mle-of-distribution-type-vs-distributions-with-parameters/75228 "2023-04-04T08:53:24Z")

</div>

I try the following, but it does not work. using Distributions p = 0.2 x = rand(Bernoulli(0.2),50) fit\_mle(Bernoulli(p), x) MethodError: no method matching fit\_mle(::Bernoulli{Float64}, ::Vector{Bool}) I know that fi…

---

## [Questions about Julia's compilation model](https://discourse.julialang.org/t/questions-about-julias-compilation-model/96831)

<div class="topic-metadata">

**Author:** [@jakobnissen](https://discourse.julialang.org/u/jakobnissen)\
**Replies:** 9\
**Last updated:** [April 4, 2023, 7:50am UTC](https://discourse.julialang.org/t/questions-about-julias-compilation-model/96831 "2023-04-04T07:50:07Z")

</div>

I have a few questions about how Julia’s compiler works. First, I sometimes see invalidated methodinstances with abstract arguments, e.g. nextind(s::AbstractString, i::Int64) from SnoopCompile output like this: backedg…

---

## [Complete and incomplete sparse cholesky factorization](https://discourse.julialang.org/t/complete-and-incomplete-sparse-cholesky-factorization/96918)

<div class="topic-metadata">

**Author:** [@shakedregev](https://discourse.julialang.org/u/shakedregev)\
**Replies:** 6\
**Last updated:** [April 4, 2023, 7:28am UTC](https://discourse.julialang.org/t/complete-and-incomplete-sparse-cholesky-factorization/96918 "2023-04-04T07:28:23Z")

</div>

Say I have a CuSparseCSR matrix “A” and I want to take complete and incomplete cholesky factorizations of it, but crucially leave that factorization on the GPU, how can I do that? Things I’ve tried: CuSparse.jl - depr…

---

## [Turing.jl: unlikely posterior with bayesian differential equation?](https://discourse.julialang.org/t/turing-jl-unlikely-posterior-with-bayesian-differential-equation/92269)

<div class="topic-metadata">

**Author:** [@Janssena](https://discourse.julialang.org/u/Janssena)\
**Replies:** 9\
**Last updated:** [April 4, 2023, 6:46am UTC](https://discourse.julialang.org/t/turing-jl-unlikely-posterior-with-bayesian-differential-equation/92269 "2023-04-04T06:46:44Z")

</div>

Hey All, I am trying to approximate the posterior distribution of a random variable inside of a differential equation with a stochastic outcome. I am able to sample from the posterior distribution, I am however unsure i…

---

## [Creating SVector of a single SVector{1, Float64}](https://discourse.julialang.org/t/creating-svector-of-a-single-svector-1-float64/96979)

<div class="topic-metadata">

**Author:** [@aafsar](https://discourse.julialang.org/u/aafsar)\
**Replies:** 8\
**Last updated:** [April 4, 2023, 5:48am UTC](https://discourse.julialang.org/t/creating-svector-of-a-single-svector-1-float64/96979 "2023-04-04T05:48:22Z")

</div>

Short version: Why can I create SVector of at least 2 SVectors of size 1, or a SVector of a single SVector of at least size 2, but cannot create SVector of a single SVector of size 1?: julia\> using StaticArrays julia\> …

---

## [How can I pre-allocate a dict?](https://discourse.julialang.org/t/how-can-i-pre-allocate-a-dict/97000)

<div class="topic-metadata">

**Author:** [@zhijie\_sun](https://discourse.julialang.org/u/zhijie_sun)\
**Replies:** 5\
**Last updated:** [April 4, 2023, 3:23am UTC](https://discourse.julialang.org/t/how-can-i-pre-allocate-a-dict/97000 "2023-04-04T03:23:16Z")

</div>

I have a function 1, contain allocation of some small dict, about two dict with less than 10 elements. And I have function 2 call this function 1 in a for loop about 2^12 times. Then I have call function 2 in a for loop …

---

## [JuMP/CPLEX: confusion with number of cuts added in callback](https://discourse.julialang.org/t/jump-cplex-confusion-with-number-of-cuts-added-in-callback/56033)

<div class="topic-metadata">

**Author:** [@mike\_k](https://discourse.julialang.org/u/mike_k)\
**Replies:** 6\
**Last updated:** [April 4, 2023, 12:44am UTC](https://discourse.julialang.org/t/jump-cplex-confusion-with-number-of-cuts-added-in-callback/56033 "2023-04-04T00:44:32Z")

</div>

Dear folks, I use JuMP (v0.21.4) and CPLEX (v0.7.3) to solve a MILP with lazy and user cuts added in a generic callback. However, I am confused with the output. To obtain the number of cuts after solving, I wrote the fu…

---

## [Delete row from DataFrame in place based on entire row value](https://discourse.julialang.org/t/delete-row-from-dataframe-in-place-based-on-entire-row-value/96961)

<div class="topic-metadata">

**Author:** [@phantom](https://discourse.julialang.org/u/phantom)\
**Replies:** 7\
**Last updated:** [April 4, 2023, 12:02am UTC](https://discourse.julialang.org/t/delete-row-from-dataframe-in-place-based-on-entire-row-value/96961 "2023-04-04T00:02:43Z")

</div>

I am trying to write a function that will efficiently delete the rows in a large DataFrame if it exists in a separate larger DataFrame. So the function look something like… function removedup!(Tables.namedtupleiterator…

---

## [Is it possible to join DataFrame with Arrow Table ensuring unique rows without bringing Arrow Table into RAM?](https://discourse.julialang.org/t/is-it-possible-to-join-dataframe-with-arrow-table-ensuring-unique-rows-without-bringing-arrow-table-into-ram/96873)

<div class="topic-metadata">

**Author:** [@phantom](https://discourse.julialang.org/u/phantom)\
**Replies:** 3\
**Last updated:** [April 3, 2023, 11:37pm UTC](https://discourse.julialang.org/t/is-it-possible-to-join-dataframe-with-arrow-table-ensuring-unique-rows-without-bringing-arrow-table-into-ram/96873 "2023-04-03T23:37:44Z")

</div>

I’m sure there is probably a better approach I am not aware of but I am trying to add a new DataFrame, NewDF to an existing Arrow table while eliminating any rows in NewDF that already exist in the Arrow file. Somethin…

---

## [Generate a (mutable) struct which inherits others](https://discourse.julialang.org/t/generate-a-mutable-struct-which-inherits-others/47347)

<div class="topic-metadata">

**Author:** [@iHany](https://discourse.julialang.org/u/iHany)\
**Replies:** 12\
**Last updated:** [April 3, 2023, 10:48pm UTC](https://discourse.julialang.org/t/generate-a-mutable-struct-which-inherits-others/47347 "2023-04-03T22:48:50Z")

</div>

Hi. Is there any way for a (mutable) struct to inherit fields from others? For example, what I’m trying to do is: mutable struct Parent foo bar end mutable struct Child \<: Parent end and use child = Child();…

---

## [How to load packages in a for loop?](https://discourse.julialang.org/t/how-to-load-packages-in-a-for-loop/97021)

<div class="topic-metadata">

**Author:** [@Hugo](https://discourse.julialang.org/u/Hugo)\
**Replies:** 8\
**Last updated:** [April 3, 2023, 10:12pm UTC](https://discourse.julialang.org/t/how-to-load-packages-in-a-for-loop/97021 "2023-04-03T22:12:23Z")

</div>

I have a Julia project that is growing in number of files. To break it into smaller and easier-to-manage files, I want to have a .jl where I keep a list of all packages required by the project. Then, I will use a for lo…

---

## [Julia v1.9.0-rc2 is now available](https://discourse.julialang.org/t/julia-v1-9-0-rc2-is-now-available/97028)

<div class="topic-metadata">

**Author:** [@ararslan](https://discourse.julialang.org/u/ararslan)\
**Replies:** 0\
**Last updated:** [April 3, 2023, 8:42pm UTC](https://discourse.julialang.org/t/julia-v1-9-0-rc2-is-now-available/97028 "2023-04-03T20:42:19Z")

</div>

The Julia developers are pleased to announce that v1.9.0-rc2, the second release candidate for the upcoming 1.9 stable series, is now available. Binaries are available for download at https://julialang.org/downloads in t…

---

## [How to intercept module variable getting and setting in Julia 1.8 similar to getproperty and setproperty! for structures?](https://discourse.julialang.org/t/how-to-intercept-module-variable-getting-and-setting-in-julia-1-8-similar-to-getproperty-and-setproperty-for-structures/97026)

<div class="topic-metadata">

**Author:** [@andrey2185](https://discourse.julialang.org/u/andrey2185)\
**Replies:** 6\
**Last updated:** [April 3, 2023, 8:16pm UTC](https://discourse.julialang.org/t/how-to-intercept-module-variable-getting-and-setting-in-julia-1-8-similar-to-getproperty-and-setproperty-for-structures/97026 "2023-04-03T20:16:08Z")

</div>

Please help, how to intercept get and set variable of module in Julia 1.8 ? julia\> module M end; julia\> # in julia 1.9 i can do this: julia\> function Base.setproperty!(m::Module, p::Symbol, v) println("varia…

---

## [Plots breaks incremental compilation](https://discourse.julialang.org/t/plots-breaks-incremental-compilation/96990)

<div class="topic-metadata">

**Author:** [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Replies:** 6\
**Last updated:** [April 3, 2023, 7:40pm UTC](https://discourse.julialang.org/t/plots-breaks-incremental-compilation/96990 "2023-04-03T19:40:00Z")

</div>

I haven’t managed to produce a MWE yet but I’m hoping someone has encountered a similar problem and can advise. Basically I am writing a PackageB that uses RecipesBase, and a PackageA that uses both PackageB and Plots.j…

[Previous page](https://discourse.julialang.org/latest.md?page=733)

[Next page](https://discourse.julialang.org/latest.md?page=735)
