# Latest

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

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

**Page:** 350

---

## [Meep FDTD and Julia](https://discourse.julialang.org/t/meep-fdtd-and-julia/109309)

<div class="topic-metadata">

**Author:** [@mike.ingold](https://discourse.julialang.org/u/mike.ingold)\
**Replies:** 17\
**Last updated:** [August 4, 2024, 4:43pm UTC](https://discourse.julialang.org/t/meep-fdtd-and-julia/109309 "2024-08-04T16:43:05Z")

</div>

Regarding the FDTD solver Meep: GitHub - NanoComp/meep: free finite-difference time-domain (FDTD) software for electromagnetic simulations. Does anyone have any interest in either a Julia package to interface with Meep, …

---

## [Function with argument of generic parametric type, and another argument subtyping the parameter](https://discourse.julialang.org/t/function-with-argument-of-generic-parametric-type-and-another-argument-subtyping-the-parameter/117813)

<div class="topic-metadata">

**Author:** [@Oblomov](https://discourse.julialang.org/u/Oblomov)\
**Replies:** 1\
**Last updated:** [August 4, 2024, 4:30pm UTC](https://discourse.julialang.org/t/function-with-argument-of-generic-parametric-type-and-another-argument-subtyping-the-parameter/117813 "2024-08-04T16:30:14Z")

</div>

Hello all, I’m still trying to understand how generic type dependencies work in Julia. As a follow-up to my question here, I would like to have a dyadic function f(a, b) with the following conditions: a should be a ve…

---

## [Shapefile.jl writing .shp without coordinates](https://discourse.julialang.org/t/shapefile-jl-writing-shp-without-coordinates/117434)

<div class="topic-metadata">

**Author:** [@alejandromerchan](https://discourse.julialang.org/u/alejandromerchan)\
**Replies:** 19\
**Last updated:** [August 4, 2024, 4:08pm UTC](https://discourse.julialang.org/t/shapefile-jl-writing-shp-without-coordinates/117434 "2024-08-04T16:08:36Z")

</div>

I loaded a Shapefile in Julia, transformed it to a datafame and then did some data cleaning, getting rid of some unneeded rows of data. I saved the shapefile again, with a new name, using “Shapefile.write” and tried to o…

---

## [Understanding generic functions and parametric types](https://discourse.julialang.org/t/understanding-generic-functions-and-parametric-types/117810)

<div class="topic-metadata">

**Author:** [@Oblomov](https://discourse.julialang.org/u/Oblomov)\
**Replies:** 3\
**Last updated:** [August 4, 2024, 3:58pm UTC](https://discourse.julialang.org/t/understanding-generic-functions-and-parametric-types/117810 "2024-08-04T15:58:15Z")

</div>

Hello all, I’m new to Julia and I’m trying to understand how type deduction works for generic functions with parametric types. To test my hands at things, I tried to define a function that takes one argument that should…

---

## [\[ANN\] ParametricBodies.jl](https://discourse.julialang.org/t/ann-parametricbodies-jl/117791)

<div class="topic-metadata">

**Author:** [@weymouth](https://discourse.julialang.org/u/weymouth)\
**Replies:** 0\
**Last updated:** [August 3, 2024, 8:26pm UTC](https://discourse.julialang.org/t/ann-parametricbodies-jl/117791 "2024-08-03T20:26:33Z")

</div>

Happy to announce that we’ve updated and registered ParametricBodies.jl which lets you quickly define 2D and 3D bodies based on any parametrically defined curve. We designed these for use in WaterLily simulations, but th…

---

## [How to use SciMLOperators.jl with autograd in DifferentialEquations.jl](https://discourse.julialang.org/t/how-to-use-scimloperators-jl-with-autograd-in-differentialequations-jl/117731)

<div class="topic-metadata">

**Author:** [@ctessum](https://discourse.julialang.org/u/ctessum)\
**Replies:** 2\
**Last updated:** [August 4, 2024, 1:47pm UTC](https://discourse.julialang.org/t/how-to-use-scimloperators-jl-with-autograd-in-differentialequations-jl/117731 "2024-08-04T13:47:36Z")

</div>

Hello, I have a system that is implemented as a FunctionOperator from SciMLOperators.jl, that I would like to integrate as a differential equation. For example: using SciMLOperators, DifferentialEquations op = Functio…

---

## [Parallelization for Large DataFrames](https://discourse.julialang.org/t/parallelization-for-large-dataframes/117807)

<div class="topic-metadata">

**Author:** [@ujjwal\_singh](https://discourse.julialang.org/u/ujjwal_singh)\
**Replies:** 2\
**Last updated:** [August 4, 2024, 1:42pm UTC](https://discourse.julialang.org/t/parallelization-for-large-dataframes/117807 "2024-08-04T13:42:44Z")

</div>

@bkamins, would you please suggest how to make the attached code more efficient with parallelization? The DataFrame size is 1,877,655,217 rows × 27 columns. using DataFrames, Dates, Statistics, Base.Threads # Optimized…

---

## [Probable data race condition causing problems when trying to parallelize a loop used to populate an array](https://discourse.julialang.org/t/probable-data-race-condition-causing-problems-when-trying-to-parallelize-a-loop-used-to-populate-an-array/117733)

<div class="topic-metadata">

**Author:** [@Uranium238](https://discourse.julialang.org/u/Uranium238)\
**Replies:** 14\
**Last updated:** [August 4, 2024, 9:35am UTC](https://discourse.julialang.org/t/probable-data-race-condition-causing-problems-when-trying-to-parallelize-a-loop-used-to-populate-an-array/117733 "2024-08-04T09:35:58Z")

</div>

I am trying to parallelize a part of my code where different values of an array x are populated asynchronously. The serial function of my full code is as follows using Distributed using MKL using DelimitedFiles using Li…

---

## [Python map\_coordinates() equivalent in Julia](https://discourse.julialang.org/t/python-map-coordinates-equivalent-in-julia/117461)

<div class="topic-metadata">

**Author:** [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Replies:** 29\
**Last updated:** [August 4, 2024, 8:53am UTC](https://discourse.julialang.org/t/python-map-coordinates-equivalent-in-julia/117461 "2024-08-04T08:53:42Z")

</div>

What would be julia equivalent of that python code ? I am using map\_coordinates — SciPy v1.14.0 Manual function. Here vals\_r ,r\_grid\_stream\_pixand theta\_grid\_stream\_pix are of type Matrix{Float64}. vals\_r = map\_coordina…

---

## [Array/Image zoom](https://discourse.julialang.org/t/array-image-zoom/52085)

<div class="topic-metadata">

**Author:** [@empet](https://discourse.julialang.org/u/empet)\
**Replies:** 7\
**Last updated:** [August 4, 2024, 8:14am UTC](https://discourse.julialang.org/t/array-image-zoom/52085 "2024-08-04T08:14:23Z")

</div>

Does anyone know if there is a package providing a function like scipy.ndimage.zoom https://docs.scipy.org/doc/scipy/reference/generated/scipy.ndimage.zoom.html?

---

## [Matrices inside a or outside a Function](https://discourse.julialang.org/t/matrices-inside-a-or-outside-a-function/117775)

<div class="topic-metadata">

**Author:** [@Benjamin7](https://discourse.julialang.org/u/Benjamin7)\
**Replies:** 12\
**Last updated:** [August 4, 2024, 8:11am UTC](https://discourse.julialang.org/t/matrices-inside-a-or-outside-a-function/117775 "2024-08-04T08:11:16Z")

</div>

Hello community! As I understand from what I have read in Julia’s optimization section, “Performance critical code should be inside a function”. My code has several for loops that fill the created arrays, my question i…

---

## [Does gurobi support a different precision other than float64](https://discourse.julialang.org/t/does-gurobi-support-a-different-precision-other-than-float64/117658)

<div class="topic-metadata">

**Author:** [@Betristor](https://discourse.julialang.org/u/Betristor)\
**Replies:** 21\
**Last updated:** [August 4, 2024, 3:34am UTC](https://discourse.julialang.org/t/does-gurobi-support-a-different-precision-other-than-float64/117658 "2024-08-04T03:34:30Z")

</div>

I want to reduce my model memory consumption with JuMP and Gurobi as solver. With about 0.3 billion variables in the model, the memory consumption increases to 1.5 TB, which exceeds my machine’s physical limit. JuMP supp…

---

## [LoadError: UndefVarError: Printf not defined](https://discourse.julialang.org/t/loaderror-undefvarerror-printf-not-defined/67482)

<div class="topic-metadata">

**Author:** [@GoH](https://discourse.julialang.org/u/GoH)\
**Replies:** 6\
**Last updated:** [August 4, 2024, 12:11am UTC](https://discourse.julialang.org/t/loaderror-undefvarerror-printf-not-defined/67482 "2024-08-04T00:11:32Z")

</div>

Hi, I just found the @printf does not work for me. Here is the code. I run it on Pluto. begin using Printf Printf.@printf end and the error is LoadError: UndefVarError: Printf not defined in expression starting at …

---

## [(Blog Post) Optimizing Repeated Correlations](https://discourse.julialang.org/t/blog-post-optimizing-repeated-correlations/117739)

<div class="topic-metadata">

**Author:** [@Satvik](https://discourse.julialang.org/u/Satvik)\
**Replies:** 5\
**Last updated:** [August 3, 2024, 7:58pm UTC](https://discourse.julialang.org/t/blog-post-optimizing-repeated-correlations/117739 "2024-08-03T19:58:54Z")

</div>

I wrote a short post on optimizing repeated correlations using Math (and Julia): https://www.lesswrong.com/posts/AESkD3gafBXx6pm77/optimizing-repeated-correlations

---

## [The good example of bpinn](https://discourse.julialang.org/t/the-good-example-of-bpinn/117781)

<div class="topic-metadata">

**Author:** [@whucsu](https://discourse.julialang.org/u/whucsu)\
**Replies:** 2\
**Last updated:** [August 3, 2024, 6:40pm UTC](https://discourse.julialang.org/t/the-good-example-of-bpinn/117781 "2024-08-03T18:40:25Z")

</div>

the example of Bayesian Physics informed Neural Network ODEs Solvers is nice. after executing, it takes about 9 minutes for one inference. I tried to use cuda gpu with the help of Monica gpt, but failed to execute. ca…

---

## [Axis-relative positioning](https://discourse.julialang.org/t/axis-relative-positioning/117749)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 3\
**Last updated:** [August 3, 2024, 9:23am UTC](https://discourse.julialang.org/t/axis-relative-positioning/117749 "2024-08-03T09:23:06Z")

</div>

I want to say Axis(ax\[1,1\]; bbox = BBox(x,x+100,y,y+50)) with the x and y being on the scale of ax’s axes – i.e. in data space. But ax\[1,1\] doesn’t work so I use Axis(fig, and so x and y are relative to fig’s coordinates…

---

## [Cross derivatives using MethodOfLines?](https://discourse.julialang.org/t/cross-derivatives-using-methodoflines/117782)

<div class="topic-metadata">

**Author:** [@MSTIITB](https://discourse.julialang.org/u/MSTIITB)\
**Replies:** 0\
**Last updated:** [August 3, 2024, 3:39am UTC](https://discourse.julialang.org/t/cross-derivatives-using-methodoflines/117782 "2024-08-03T03:39:56Z")

</div>

I was wondering if MethodOfLines allows cross derivatives. Something like this: Dxt = Differential(x)\*Differential(t) My equation looks something like this: eq = \[Dtt(F(t,x)) + 2\*Dxt(F(t,x)) ~ A\*Dxx(F(t,x)) + B\*Dx(F(t…

---

## [How to play a sound or tone when a program ends?](https://discourse.julialang.org/t/how-to-play-a-sound-or-tone-when-a-program-ends/41239)

<div class="topic-metadata">

**Author:** [@CosmoProf](https://discourse.julialang.org/u/CosmoProf)\
**Replies:** 34\
**Last updated:** [August 3, 2024, 1:47am UTC](https://discourse.julialang.org/t/how-to-play-a-sound-or-tone-when-a-program-ends/41239 "2024-08-03T01:47:35Z")

</div>

Hi, I was wondering how to set a julia program to beep or play some tones or music when a long program finally finishes running. (Googling this question leads to recommendations for old packages, like AudioIO, which are…

---

## [Simple Devcontainer vscode for Julia SciML + PyCall](https://discourse.julialang.org/t/simple-devcontainer-vscode-for-julia-sciml-pycall/117776)

<div class="topic-metadata">

**Author:** [@msfz751](https://discourse.julialang.org/u/msfz751)\
**Replies:** 0\
**Last updated:** [August 2, 2024, 10:45pm UTC](https://discourse.julialang.org/t/simple-devcontainer-vscode-for-julia-sciml-pycall/117776 "2024-08-02T22:45:44Z")

</div>

I am exploring SciML with Julia and found that the best way to experiment with Julia advanced feature without touchingt the core OS was using Devcontainers via vscode. This could be useful for beginners. This is is simp…

---

## [Constrained ordered prior for ordered logistic model](https://discourse.julialang.org/t/constrained-ordered-prior-for-ordered-logistic-model/55670)

<div class="topic-metadata">

**Author:** [@Neal](https://discourse.julialang.org/u/Neal)\
**Replies:** 3\
**Last updated:** [August 2, 2024, 9:16pm UTC](https://discourse.julialang.org/t/constrained-ordered-prior-for-ordered-logistic-model/55670 "2024-08-02T21:16:47Z")

</div>

Hello, I have a task for modeling ordered discrete response outcome but I struggled to make my prior ordered for ordered logistic model so theta\[6\] \> theta\[5\] \> theta\[4\] \> theta\[3\] \> theta\[2\] \> theta\[1\]. In Stan, I can d…

---

## [Renaming package, need to update JuliaHub registry](https://discourse.julialang.org/t/renaming-package-need-to-update-juliahub-registry/117771)

<div class="topic-metadata">

**Author:** [@awiersdorf](https://discourse.julialang.org/u/awiersdorf)\
**Replies:** 2\
**Last updated:** [August 2, 2024, 9:57pm UTC](https://discourse.julialang.org/t/renaming-package-need-to-update-juliahub-registry/117771 "2024-08-02T21:57:44Z")

</div>

I have a package I helped develop in concert with a paper at 2023 JuliaCon. Among the feedback we got from reviewers was that we should rename the package from “FloatTracker.jl” to “TrackedFloats.jl”. What is the best wa…

---

## [Ask user to provide points coordinates as two vectors or as a single vector of tuples?](https://discourse.julialang.org/t/ask-user-to-provide-points-coordinates-as-two-vectors-or-as-a-single-vector-of-tuples/117717)

<div class="topic-metadata">

**Author:** [@K5Julien](https://discourse.julialang.org/u/K5Julien)\
**Replies:** 10\
**Last updated:** [August 2, 2024, 9:21pm UTC](https://discourse.julialang.org/t/ask-user-to-provide-points-coordinates-as-two-vectors-or-as-a-single-vector-of-tuples/117717 "2024-08-02T21:21:42Z")

</div>

When asking the user to provide coordinates of plan points for my package RingStarProblems.jl I initially thought the following was best: xycoordinates = tuple.(1:10, rand(1:10, 10)) somefunction(xycoordinates) However…

---

## [How to use format\_md in JuliaFormatter](https://discourse.julialang.org/t/how-to-use-format-md-in-juliaformatter/117773)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 0\
**Last updated:** [August 2, 2024, 7:11pm UTC](https://discourse.julialang.org/t/how-to-use-format-md-in-juliaformatter/117773 "2024-08-02T19:11:56Z")

</div>

Hello, I would like to know how to use the function format\_md in JuliaFormatter. For example, how do I format markdown files used with Documenter.jl? Thank you.

---

## [Basic trigonometric simplifications in Symbolics.jl](https://discourse.julialang.org/t/basic-trigonometric-simplifications-in-symbolics-jl/99507)

<div class="topic-metadata">

**Author:** [@pr0physicist](https://discourse.julialang.org/u/pr0physicist)\
**Replies:** 1\
**Last updated:** [August 2, 2024, 6:07pm UTC](https://discourse.julialang.org/t/basic-trigonometric-simplifications-in-symbolics-jl/99507 "2024-08-02T18:07:35Z")

</div>

Julia: v1.9.0 Symbolics.jl: v5.3.1 Not sure if this is the intended behavior: using Symbolics @variables x simplify(sin(x) + sin(-x)) returns sin(x) + sin(-x) instead of 0, which is really surprising. Then checke…

---

## [Linting wrong but not sure what caused it](https://discourse.julialang.org/t/linting-wrong-but-not-sure-what-caused-it/117770)

<div class="topic-metadata">

**Author:** [@Nosferican](https://discourse.julialang.org/u/Nosferican)\
**Replies:** 0\
**Last updated:** [August 2, 2024, 5:37pm UTC](https://discourse.julialang.org/t/linting-wrong-but-not-sure-what-caused-it/117770 "2024-08-02T17:37:19Z")

</div>

I have two systems running the same version of the VS Code but different linting: Is anyone experiencing the same issue or has hints on debugging it? Seems to be related to the parsing for the frontmatter. Update…

---

## [Update non linear solve with sliders (Makie)](https://discourse.julialang.org/t/update-non-linear-solve-with-sliders-makie/117767)

<div class="topic-metadata">

**Author:** [@Mehdi\_MABED](https://discourse.julialang.org/u/Mehdi_MABED)\
**Replies:** 1\
**Last updated:** [August 2, 2024, 3:39pm UTC](https://discourse.julialang.org/t/update-non-linear-solve-with-sliders-makie/117767 "2024-08-02T15:39:08Z")

</div>

I would like to plot iwith GLMakie the solution of a non linear equation that I solve with the NonlinearSolve.jl package, but I would like this plot to be updated when I move a slider (the parameter of the equation is li…

---

## [Troubles with GeoStats/GeoIO coordinates with units](https://discourse.julialang.org/t/troubles-with-geostats-geoio-coordinates-with-units/117766)

<div class="topic-metadata">

**Author:** [@TimG](https://discourse.julialang.org/u/TimG)\
**Replies:** 5\
**Last updated:** [August 1, 2024, 10:39am UTC](https://discourse.julialang.org/t/troubles-with-geostats-geoio-coordinates-with-units/117766 "2024-08-01T10:39:09Z")

</div>

Thank you @juliohm! File reads fine now. New issue - too small to warrant new thread, perhaps. bb = boundingbox(gt.geometry) minx, miny = coordinates(bb.min)\[1:2\] coordinates function no longer works. ERROR: LoadErro…

---

## [Using DynamicHMC for a model defined in Python](https://discourse.julialang.org/t/using-dynamichmc-for-a-model-defined-in-python/117765)

<div class="topic-metadata">

**Author:** [@Douwe](https://discourse.julialang.org/u/Douwe)\
**Replies:** 0\
**Last updated:** [August 2, 2024, 12:47pm UTC](https://discourse.julialang.org/t/using-dynamichmc-for-a-model-defined-in-python/117765 "2024-08-02T12:47:15Z")

</div>

Hi I’ve been trying to use DynamicHMC to sample my model written in Python. The problem I’m encountering is that I don’t know how to structure the output of my log posterior function in julia correctly, so the MCMC sampl…

---

## [State Space Model with PID controller unstable in Julia compared to Matlab](https://discourse.julialang.org/t/state-space-model-with-pid-controller-unstable-in-julia-compared-to-matlab/117688)

<div class="topic-metadata">

**Author:** [@lstagner](https://discourse.julialang.org/u/lstagner)\
**Replies:** 22\
**Last updated:** [August 2, 2024, 11:23am UTC](https://discourse.julialang.org/t/state-space-model-with-pid-controller-unstable-in-julia-compared-to-matlab/117688 "2024-08-02T11:23:21Z")

</div>

I have the following code in Matlab that creates a stable system using a simple PID controller. %% Define system sys = ss(A,B,C,D); %% New state space sys\_new = sys(\[1379\],13); %% Define s domain Kp = 0; Ki = 0; % N…

---

## [Weird results while trying to measure allocation :/](https://discourse.julialang.org/t/weird-results-while-trying-to-measure-allocation/117745)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 1\
**Last updated:** [August 2, 2024, 12:19am UTC](https://discourse.julialang.org/t/weird-results-while-trying-to-measure-allocation/117745 "2024-08-02T00:19:16Z")

</div>

Consider this Julia program: f() = Vector{Int}(undef, 128\*1024\*1024) (@timed f()).bytes (r = @timed f()); r.bytes Why do recent versions of Julia (v1.8 and up) evaluate the second line as 0? It really seems like the se…

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

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