# Latest

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

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

**Page:** 605

---

## [How to obtain gradients from training a model](https://discourse.julialang.org/t/how-to-obtain-gradients-from-training-a-model/103558)

<div class="topic-metadata">

**Author:** [@cirobr](https://discourse.julialang.org/u/cirobr)\
**Replies:** 1\
**Last updated:** [September 6, 2023, 1:03am UTC](https://discourse.julialang.org/t/how-to-obtain-gradients-from-training-a-model/103558 "2023-09-06T01:03:27Z")

</div>

Cheers. When training a model, I want to investigate on the occurrence of exploding gradients. For this reason, I am using the following code to obtain the gradient values when training one epoch: losses = Float32\[\] al…

---

## [Handling prematurely terminated ODE integration in parameter estimation](https://discourse.julialang.org/t/handling-prematurely-terminated-ode-integration-in-parameter-estimation/103514)

<div class="topic-metadata">

**Author:** [@Neodym](https://discourse.julialang.org/u/Neodym)\
**Replies:** 3\
**Last updated:** [September 5, 2023, 10:25pm UTC](https://discourse.julialang.org/t/handling-prematurely-terminated-ode-integration-in-parameter-estimation/103514 "2023-09-05T22:25:30Z")

</div>

Hi, I’m trying to estimate parameters of an ODE model using DifferentialEquations, SciMLSensitivity, and Optimization packages. In particular, I’ve found that Ipopt works quite well for my problem. Sometimes, though, t…

---

## [Identical differential equations give different solutions when an independent equation is added](https://discourse.julialang.org/t/identical-differential-equations-give-different-solutions-when-an-independent-equation-is-added/103549)

<div class="topic-metadata">

**Author:** [@70Gage70](https://discourse.julialang.org/u/70Gage70)\
**Replies:** 4\
**Last updated:** [September 5, 2023, 9:45pm UTC](https://discourse.julialang.org/t/identical-differential-equations-give-different-solutions-when-an-independent-equation-is-added/103549 "2023-09-05T21:45:04Z")

</div>

I define the Lorenz system twice, once the standard way and once with an extra equation that depends only on u\_1. using DifferentialEquations using Makie, CairoMakie function lorenz!(du, u, p, t) du\[1\] = 10.0 \* (u\[…

---

## [Sort elements by frequency in julia](https://discourse.julialang.org/t/sort-elements-by-frequency-in-julia/103433)

<div class="topic-metadata">

**Author:** [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Replies:** 4\
**Last updated:** [September 5, 2023, 9:21pm UTC](https://discourse.julialang.org/t/sort-elements-by-frequency-in-julia/103433 "2023-09-05T21:21:20Z")

</div>

I want to sort elements by frequency . For example let x = \["a", "d", "d", "c", "c", "c", "f", "b", "b" ,"b", "b"\] I want to have output sorted as x = \["b", "b" ,"b", "b","c", "c", "c, "d", "d", "a", "f"\] where we ha…

---

## [A native Julia package for satellite images?](https://discourse.julialang.org/t/a-native-julia-package-for-satellite-images/44689)

<div class="topic-metadata">

**Author:** [@mihalybaci](https://discourse.julialang.org/u/mihalybaci)\
**Replies:** 20\
**Last updated:** [September 5, 2023, 8:44pm UTC](https://discourse.julialang.org/t/a-native-julia-package-for-satellite-images/44689 "2023-09-05T20:44:54Z")

</div>

I use satellite data from a few sources (NASA- Landsat, etc., ESA - Sentinel1/2, etc.), and I know that there are a few ways to handle this in Julia (like GeoArrays.jl ArchGDAL.jl). But are there any thoughts to developi…

---

## [Weave doctype = "md2html" without building figure sub-directory?](https://discourse.julialang.org/t/weave-doctype-md2html-without-building-figure-sub-directory/103552)

<div class="topic-metadata">

**Author:** [@matnbo](https://discourse.julialang.org/u/matnbo)\
**Replies:** 0\
**Last updated:** [September 5, 2023, 7:42pm UTC](https://discourse.julialang.org/t/weave-doctype-md2html-without-building-figure-sub-directory/103552 "2023-09-05T19:42:36Z")

</div>

When using function weave of Weave.jl to build an Html file from a Julia markdown file, such as: weave(“mypage.jmd”; out\_path = my\_out\_path, doctype = “md2html”) the function automtically creates a sub-directory (in …

---

## [Using Benchmarktools with in-place functions and a default mutable struct](https://discourse.julialang.org/t/using-benchmarktools-with-in-place-functions-and-a-default-mutable-struct/103545)

<div class="topic-metadata">

**Author:** [@arnerob](https://discourse.julialang.org/u/arnerob)\
**Replies:** 2\
**Last updated:** [September 5, 2023, 7:11pm UTC](https://discourse.julialang.org/t/using-benchmarktools-with-in-place-functions-and-a-default-mutable-struct/103545 "2023-09-05T19:11:10Z")

</div>

I want to benchmark a function by every time using the default value of a mutable struct. I tried to recreate a minimal working example of my code and what goes wrong: mutable struct myNum{T\<:Real} n::T; myN…

---

## [Python setup across multiple dependent packages using PyCall](https://discourse.julialang.org/t/python-setup-across-multiple-dependent-packages-using-pycall/103270)

<div class="topic-metadata">

**Author:** [@facusapienza](https://discourse.julialang.org/u/facusapienza)\
**Replies:** 1\
**Last updated:** [September 5, 2023, 6:41pm UTC](https://discourse.julialang.org/t/python-setup-across-multiple-dependent-packages-using-pycall/103270 "2023-09-05T18:41:44Z")

</div>

Hi, Does anyone knows how to setup a Julia package that uses Python via another imported package that includes the PyCall setup? Here a more detailed explanation: I am developing a series of packages that depend of eac…

---

## [Blog Post: Tight link between code and math, while keeping speed](https://discourse.julialang.org/t/blog-post-tight-link-between-code-and-math-while-keeping-speed/103548)

<div class="topic-metadata">

**Author:** [@alfaromartino](https://discourse.julialang.org/u/alfaromartino)\
**Replies:** 0\
**Last updated:** [September 5, 2023, 4:43pm UTC](https://discourse.julialang.org/t/blog-post-tight-link-between-code-and-math-while-keeping-speed/103548 "2023-09-05T16:43:24Z")

</div>

I wrote a blog post about how Julia makes it possible to maintain a tight connection between the code and the written equations of a model, without sacrificing speed. The goal was to demonstrate an approach I use to str…

---

## [Mixed NN and functions fail with NeuralPDE](https://discourse.julialang.org/t/mixed-nn-and-functions-fail-with-neuralpde/103447)

<div class="topic-metadata">

**Author:** [@Knud\_Sorensen](https://discourse.julialang.org/u/Knud_Sorensen)\
**Replies:** 7\
**Last updated:** [September 5, 2023, 3:13pm UTC](https://discourse.julialang.org/t/mixed-nn-and-functions-fail-with-neuralpde/103447 "2023-09-05T15:13:04Z")

</div>

Hi. I’m trying to use NeuralPDE to approximate a solution to a PDE containing both Neural nets and functions. Something goes wrong, can you help ? I am new to NeuralPDE, so it might just be a newbie error. Here is the …

---

## [Sparse matrix vector faster than dense matrix vector?](https://discourse.julialang.org/t/sparse-matrix-vector-faster-than-dense-matrix-vector/103446)

<div class="topic-metadata">

**Author:** [@dgleich](https://discourse.julialang.org/u/dgleich)\
**Replies:** 9\
**Last updated:** [September 5, 2023, 2:15pm UTC](https://discourse.julialang.org/t/sparse-matrix-vector-faster-than-dense-matrix-vector/103446 "2023-09-05T14:15:44Z")

</div>

As I was teaching sparse matrices in class, I was humbled by a theory-practice gap. The idea in theory: don’t use sparse matrices when you really have dense matrix. The idea in practice: here, let me show you in Julia! …

---

## [Any examples applying Physics Informed Neural Networks to ODEs?](https://discourse.julialang.org/t/any-examples-applying-physics-informed-neural-networks-to-odes/103512)

<div class="topic-metadata">

**Author:** [@affans](https://discourse.julialang.org/u/affans)\
**Replies:** 1\
**Last updated:** [September 5, 2023, 2:04pm UTC](https://discourse.julialang.org/t/any-examples-applying-physics-informed-neural-networks-to-odes/103512 "2023-09-05T14:04:25Z")

</div>

I recently have been involved in PINNs and their applications. While I understand the mathematics of NNs, ODE solvers, PDEs, etc… I have very little experience in implementing them and in Julia especially. Does anyone ha…

---

## [Unexpected behavior when using Threads.@spawn](https://discourse.julialang.org/t/unexpected-behavior-when-using-threads-spawn/103497)

<div class="topic-metadata">

**Author:** [@chiion](https://discourse.julialang.org/u/chiion)\
**Replies:** 8\
**Last updated:** [September 5, 2023, 2:03pm UTC](https://discourse.julialang.org/t/unexpected-behavior-when-using-threads-spawn/103497 "2023-09-05T14:03:22Z")

</div>

Hi all, Since Threads.@spawn is encouraged over @async according to doc, so I decided to convert all @async to Threads.@spawn when reusing some of my old code. However, I’m getting some unexpected behaviors, for examp…

---

## [Inner join by comparing column values](https://discourse.julialang.org/t/inner-join-by-comparing-column-values/103528)

<div class="topic-metadata">

**Author:** [@Sandy45](https://discourse.julialang.org/u/Sandy45)\
**Replies:** 3\
**Last updated:** [September 5, 2023, 1:25pm UTC](https://discourse.julialang.org/t/inner-join-by-comparing-column-values/103528 "2023-09-05T13:25:46Z")

</div>

I just wanted to check if we can do inner join and fetch result of matching rows by comparing column values of two data frames. Currently I’ve tried below code and getting error “ArgumentError: All elements of on argume…

---

## [Why are returned types different in comprehension over an empty range if called from a function vs top level?](https://discourse.julialang.org/t/why-are-returned-types-different-in-comprehension-over-an-empty-range-if-called-from-a-function-vs-top-level/103533)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 3\
**Last updated:** [September 5, 2023, 1:13pm UTC](https://discourse.julialang.org/t/why-are-returned-types-different-in-comprehension-over-an-empty-range-if-called-from-a-function-vs-top-level/103533 "2023-09-05T13:13:26Z")

</div>

julia\> using ApproxFun julia\> rs = Jacobi(5,4); julia\> d = domain(rs); julia\> Sf = JacobiWeight(0,2,ConstantSpace(d)); julia\> using ApproxFun.ApproxFunSingularities: jacobiweight julia\> using ApproxFun.ApproxFunBase…

---

## [Why doesn't multi-dimensional Array have zero-argument constructor?](https://discourse.julialang.org/t/why-doesnt-multi-dimensional-array-have-zero-argument-constructor/103367)

<div class="topic-metadata">

**Author:** [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Replies:** 10\
**Last updated:** [September 5, 2023, 1:05pm UTC](https://discourse.julialang.org/t/why-doesnt-multi-dimensional-array-have-zero-argument-constructor/103367 "2023-09-05T13:05:35Z")

</div>

I can create an empty one-dimensional array with a zero-argument constructor: julia\> Vector{Float64}() Float64\[\] But I can’t create an empty multi-dimensional array with a zero-argument constructor: julia\> Array{Float…

---

## [What steps should the Julia community take to bring Julia to the next level of popularity?](https://discourse.julialang.org/t/what-steps-should-the-julia-community-take-to-bring-julia-to-the-next-level-of-popularity/101389)

<div class="topic-metadata">

**Author:** [@xiaoxi](https://discourse.julialang.org/u/xiaoxi)\
**Replies:** 568\
**Last updated:** [September 5, 2023, 12:28pm UTC](https://discourse.julialang.org/t/what-steps-should-the-julia-community-take-to-bring-julia-to-the-next-level-of-popularity/101389 "2023-09-05T12:28:34Z")

</div>

The release of Julia 2.0 could spark additional interest in the Julia community and thus, provide a unique opportunity to promote Julia. What steps should the Julia community take from now until the release of Julia 2.0…

---

## [I am unable to fit a simple 2d function using a neural network in Julia. Am I doing somethng wrong here?](https://discourse.julialang.org/t/i-am-unable-to-fit-a-simple-2d-function-using-a-neural-network-in-julia-am-i-doing-somethng-wrong-here/103517)

<div class="topic-metadata">

**Author:** [@Shashank](https://discourse.julialang.org/u/Shashank)\
**Replies:** 3\
**Last updated:** [September 5, 2023, 12:12pm UTC](https://discourse.julialang.org/t/i-am-unable-to-fit-a-simple-2d-function-using-a-neural-network-in-julia-am-i-doing-somethng-wrong-here/103517 "2023-09-05T12:12:25Z")

</div>

I am writing to write a code for interpolating a function using a neural network in Flux.jl, but the loss function does not decrease at all. Am I doing something wrong here? I am sorry if there is a trivial problem, as I…

---

## [Debugging extremely slow](https://discourse.julialang.org/t/debugging-extremely-slow/53801)

<div class="topic-metadata">

**Author:** [@PrintRind](https://discourse.julialang.org/u/PrintRind)\
**Replies:** 56\
**Last updated:** [September 5, 2023, 7:48am UTC](https://discourse.julialang.org/t/debugging-extremely-slow/53801 "2023-09-05T07:48:11Z")

</div>

I’m currently trying to make the switch from Matlab to Julia 1.5.3. I am currently working with Atom/Juno (Atom 1.54.0, uber-juno 0.3.0) because of it’s similarity to the the Matlab editor. While I like many things in Ju…

---

## [Storage of functions with pre-defined argument values](https://discourse.julialang.org/t/storage-of-functions-with-pre-defined-argument-values/103502)

<div class="topic-metadata">

**Author:** [@Charly\_Theo](https://discourse.julialang.org/u/Charly_Theo)\
**Replies:** 4\
**Last updated:** [September 5, 2023, 6:57am UTC](https://discourse.julialang.org/t/storage-of-functions-with-pre-defined-argument-values/103502 "2023-09-05T06:57:30Z")

</div>

Hi all, I am trying to store a vector of functions, which can later be retrieved and applied to one or more vectors. An example: using ShiftedArrays fs = Function\[ShiftedArrays.lag, diff\] x = rand(10) for f in fs …

---

## [PackageCompiler.jl does not support ARGS (arguments)?](https://discourse.julialang.org/t/packagecompiler-jl-does-not-support-args-arguments/103513)

<div class="topic-metadata">

**Author:** [@Miroslav-Stimac](https://discourse.julialang.org/u/Miroslav-Stimac)\
**Replies:** 3\
**Last updated:** [September 5, 2023, 6:14am UTC](https://discourse.julialang.org/t/packagecompiler-jl-does-not-support-args-arguments/103513 "2023-09-05T06:14:21Z")

</div>

Hello, It seems that PackageCompiler does not work with ARGS. I tried several ways and none worked: CASE 1: In precompile\_app.jl: MyProgram.julia\_main(\["CHECK\_DATA\_1", "DEV"\]) In MyProgram.jl: module MyProgram a…

---

## [Creating Variables from a Vector of Tuples and Naming Them](https://discourse.julialang.org/t/creating-variables-from-a-vector-of-tuples-and-naming-them/103525)

<div class="topic-metadata">

**Author:** [@nemoincognito](https://discourse.julialang.org/u/nemoincognito)\
**Replies:** 8\
**Last updated:** [September 5, 2023, 3:22am UTC](https://discourse.julialang.org/t/creating-variables-from-a-vector-of-tuples-and-naming-them/103525 "2023-09-05T03:22:00Z")

</div>

I have converted some PuLP code to Julia and have three vectors of Tuples. supplylist: 149988-element Vector{Tuple{String15, String31}} flowslist: 499572-element Vector{Tuple{String15, String15, String31}} edgelist: …

---

## [Making progress on my online multiplayer Julia game!](https://discourse.julialang.org/t/making-progress-on-my-online-multiplayer-julia-game/103524)

<div class="topic-metadata">

**Author:** [@Kyjor](https://discourse.julialang.org/u/Kyjor)\
**Replies:** 0\
**Last updated:** [September 5, 2023, 1:08am UTC](https://discourse.julialang.org/t/making-progress-on-my-online-multiplayer-julia-game/103524 "2023-09-05T01:08:06Z")

</div>

Hey everyone, I just wanted to give an update on progress on my little networked game using my Julia game engine JulGame.jl. Since the last post, I’ve implemented a few things including: Selecting a name an…

---

## [How to compute Hessian sub-blocks with autodiff?](https://discourse.julialang.org/t/how-to-compute-hessian-sub-blocks-with-autodiff/103494)

<div class="topic-metadata">

**Author:** [@biona001](https://discourse.julialang.org/u/biona001)\
**Replies:** 7\
**Last updated:** [September 4, 2023, 10:23pm UTC](https://discourse.julialang.org/t/how-to-compute-hessian-sub-blocks-with-autodiff/103494 "2023-09-04T22:23:51Z")

</div>

Hi community, I’m trying to use ForwardDiff.jl to compute a Hessian for a log likelihood function. Computing the full Hessian takes a long time, and I’m only interested in a sub-block of the Hessian anyway. Is there any…

---

## ["Compiling" DSL code to Reduce Indirection](https://discourse.julialang.org/t/compiling-dsl-code-to-reduce-indirection/103516)

<div class="topic-metadata">

**Author:** [@Ian\_L](https://discourse.julialang.org/u/Ian_L)\
**Replies:** 0\
**Last updated:** [September 4, 2023, 5:43pm UTC](https://discourse.julialang.org/t/compiling-dsl-code-to-reduce-indirection/103516 "2023-09-04T17:43:56Z")

</div>

Hello, In my quest to learn more about how to write DSLs in Julia, I’ve reach a point in the design and would like feedback and suggestions. For reference, the DSL is based of the SPPL language for symbolic exact infere…

---

## [How to put text on a Gantt chart (Vega-Lite)?](https://discourse.julialang.org/t/how-to-put-text-on-a-gantt-chart-vega-lite/103515)

<div class="topic-metadata">

**Author:** [@Josa9321](https://discourse.julialang.org/u/Josa9321)\
**Replies:** 1\
**Last updated:** [September 4, 2023, 5:36pm UTC](https://discourse.julialang.org/t/how-to-put-text-on-a-gantt-chart-vega-lite/103515 "2023-09-04T17:36:39Z")

</div>

Hi, This plot using Vega-Lite for Gantt charts is almost perfect for me, but I want the text of the task on the plot. Here is my code with the image generated. using DataFrames, VegaLite # Create a DataFrame df = Data…

---

## [Grouping plots to be able to overwrite them with new data](https://discourse.julialang.org/t/grouping-plots-to-be-able-to-overwrite-them-with-new-data/103397)

<div class="topic-metadata">

**Author:** [@peremato](https://discourse.julialang.org/u/peremato)\
**Replies:** 3\
**Last updated:** [September 4, 2023, 4:16pm UTC](https://discourse.julialang.org/t/grouping-plots-to-be-able-to-overwrite-them-with-new-data/103397 "2023-09-04T16:16:18Z")

</div>

When visualising 3D data I would like to keep some geometrical structures fixed (plotted with a series of functions mesh!), while to be able to overwrite a set of plots made with lines!, text!, etc. with new data. Is it…

---

## [MethodError: ADgradient(::Val{:ForwardDiff}, ::LogDensityFunction{DynamicPPL.TypedVarInfo](https://discourse.julialang.org/t/methoderror-adgradient-val-forwarddiff-logdensityfunction-dynamicppl-typedvarinfo/103509)

<div class="topic-metadata">

**Author:** [@99dB](https://discourse.julialang.org/u/99dB)\
**Replies:** 4\
**Last updated:** [September 4, 2023, 3:12pm UTC](https://discourse.julialang.org/t/methoderror-adgradient-val-forwarddiff-logdensityfunction-dynamicppl-typedvarinfo/103509 "2023-09-04T15:12:25Z")

</div>

Hello all, When sampling a Turing problem involving an ode I got, the following error message: MethodError: ADgradient(::Val{:ForwardDiff}, ::LogDensityFunction{DynamicPPL.TypedVarInfo Closest candidates are: ADgrad…

---

## [Check if a function has a docstring](https://discourse.julialang.org/t/check-if-a-function-has-a-docstring/103489)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 8\
**Last updated:** [September 4, 2023, 2:01pm UTC](https://discourse.julialang.org/t/check-if-a-function-has-a-docstring/103489 "2023-09-04T14:01:35Z")

</div>

How can I check programmatically if a function has a docstring?

---

## [Declaration of variables](https://discourse.julialang.org/t/declaration-of-variables/103508)

<div class="topic-metadata">

**Author:** [@Alois](https://discourse.julialang.org/u/Alois)\
**Replies:** 2\
**Last updated:** [September 4, 2023, 1:42pm UTC](https://discourse.julialang.org/t/declaration-of-variables/103508 "2023-09-04T13:42:00Z")

</div>

How is a variable declared as a simple Float64, say, without initializing it? Something like A= Array{Float64, 0}(undef), which works for vectors.

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

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