# Latest

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

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

**Page:** 423

---

## [Subtracting mean from DataFrame column: Why so many allocations?](https://discourse.julialang.org/t/subtracting-mean-from-dataframe-column-why-so-many-allocations/113607)

<div class="topic-metadata">

**Author:** [@JWMeer](https://discourse.julialang.org/u/JWMeer)\
**Replies:** 5\
**Last updated:** [April 29, 2024, 3:09pm UTC](https://discourse.julialang.org/t/subtracting-mean-from-dataframe-column-why-so-many-allocations/113607 "2024-04-29T15:09:57Z")

</div>

Consider the following DataFrame: df = DataFrame() df.a = repeat(1:1000, outer = 1000) df.b = rand(1000 \* 1000) This DataFrame consists of 1000 groups (grouped by a) of 1000 values each (stored in b). For each group, I…

---

## [EDF.jl package: Finding sample rate of a signal](https://discourse.julialang.org/t/edf-jl-package-finding-sample-rate-of-a-signal/113610)

<div class="topic-metadata">

**Author:** [@Santiago\_Lopez](https://discourse.julialang.org/u/Santiago_Lopez)\
**Replies:** 1\
**Last updated:** [April 29, 2024, 1:19pm UTC](https://discourse.julialang.org/t/edf-jl-package-finding-sample-rate-of-a-signal/113610 "2024-04-29T13:19:39Z")

</div>

In other languages (e.g. Python and R), packages for reading EDF files typically include the capacity to extract the sampling rate of a signal. This doesn’t seem to be possible in the EDF.jl package. My two questions are…

---

## [Anyone has a starter guide on finite element analysis?](https://discourse.julialang.org/t/anyone-has-a-starter-guide-on-finite-element-analysis/112894)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 5\
**Last updated:** [April 29, 2024, 12:22pm UTC](https://discourse.julialang.org/t/anyone-has-a-starter-guide-on-finite-element-analysis/112894 "2024-04-29T12:22:45Z")

</div>

After exploring several ideas, I think the idea I’m going to implement would be to simulate air pressure in a musical instrument or vocal tract to synthesize voice. I found finite-element method to be suitable for this a…

---

## [Converting Author's map in Suneater Series to Map of Milky Way Galaxy](https://discourse.julialang.org/t/converting-authors-map-in-suneater-series-to-map-of-milky-way-galaxy/113263)

<div class="topic-metadata">

**Author:** [@StevenSiew](https://discourse.julialang.org/u/StevenSiew)\
**Replies:** 6\
**Last updated:** [April 29, 2024, 12:13pm UTC](https://discourse.julialang.org/t/converting-authors-map-in-suneater-series-to-map-of-milky-way-galaxy/113263 "2024-04-29T12:13:26Z")

</div>

For the Sun Eater Series by Christopher Ruocchio url: AMAZON There is a map in BOOK 6 which looks like I want to convert the map to one in which I can see star system embedded within the Milky Way Galaxy which I …

---

## [Can we accelerate functions from other packages using juliaGPU package?](https://discourse.julialang.org/t/can-we-accelerate-functions-from-other-packages-using-juliagpu-package/113587)

<div class="topic-metadata">

**Author:** [@tjk](https://discourse.julialang.org/u/tjk)\
**Replies:** 2\
**Last updated:** [April 29, 2024, 11:03am UTC](https://discourse.julialang.org/t/can-we-accelerate-functions-from-other-packages-using-juliagpu-package/113587 "2024-04-29T11:03:15Z")

</div>

Hello, I want to accelerate functions imported from other julia packages. In the past, I always use using Distributed addprocs(Num) To accelerate computation, and what I need to do is just write the functions and exec…

---

## [Debugging type-instability allocations with ForwardDiff](https://discourse.julialang.org/t/debugging-type-instability-allocations-with-forwarddiff/113591)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 12\
**Last updated:** [April 29, 2024, 10:58am UTC](https://discourse.julialang.org/t/debugging-type-instability-allocations-with-forwarddiff/113591 "2024-04-29T10:58:21Z")

</div>

I’m really struggling with my ForwardDiff.jl bindings for DifferentiationInterface.jl. The goal is to achieve an allocation-free Jacobian-vector product (aka pushforward) for functions of the form f!(y, x). I have succe…

---

## [How to directly load a JPEG image directly from URL into Luxor](https://discourse.julialang.org/t/how-to-directly-load-a-jpeg-image-directly-from-url-into-luxor/113578)

<div class="topic-metadata">

**Author:** [@StevenSiew](https://discourse.julialang.org/u/StevenSiew)\
**Replies:** 2\
**Last updated:** [April 29, 2024, 10:34am UTC](https://discourse.julialang.org/t/how-to-directly-load-a-jpeg-image-directly-from-url-into-luxor/113578 "2024-04-29T10:34:30Z")

</div>

I have figured out how to load a PNG image directly into Luxor. My solution is crude but it works. using Luxor using HTTP dir\_temp\_name = tempname() println("dir\_temp\_name is ",dir\_temp\_name) file\_temp\_name = HTTP.downl…

---

## [Efficient approach to modifying existing JuMP constraints](https://discourse.julialang.org/t/efficient-approach-to-modifying-existing-jump-constraints/113492)

<div class="topic-metadata">

**Author:** [@aartinian](https://discourse.julialang.org/u/aartinian)\
**Replies:** 8\
**Last updated:** [April 29, 2024, 7:21am UTC](https://discourse.julialang.org/t/efficient-approach-to-modifying-existing-jump-constraints/113492 "2024-04-29T07:21:49Z")

</div>

Hello everyone, Long time lurker, first time poster. :smiley: I’m trying to add a new expression to an existing JuMP constraint, but my approach seems pretty slow. Am I approaching this wrong? Thank you in advance. # @…

---

## [Can the fields of a Julia type have default values?](https://discourse.julialang.org/t/can-the-fields-of-a-julia-type-have-default-values/113601)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 4\
**Last updated:** [April 29, 2024, 6:35am UTC](https://discourse.julialang.org/t/can-the-fields-of-a-julia-type-have-default-values/113601 "2024-04-29T06:35:51Z")

</div>

julia\> struct MyType n::Int64 end julia\> a = MyType(3) MyType(3) julia\> a.n 3 julia\> b = MyType() ERROR: MethodError: no method matching MyType() Can I set a default number for the field n (e.g., n = 1 by default) so…

---

## [Why are Neural SDEs trained with TrackerAdjoint()?](https://discourse.julialang.org/t/why-are-neural-sdes-trained-with-trackeradjoint/113514)

<div class="topic-metadata">

**Author:** [@agelgazzar](https://discourse.julialang.org/u/agelgazzar)\
**Replies:** 1\
**Last updated:** [April 29, 2024, 5:39am UTC](https://discourse.julialang.org/t/why-are-neural-sdes-trained-with-trackeradjoint/113514 "2024-04-29T05:39:31Z")

</div>

I thought that Tracker was mostly replaced by Zygote and Enzyme for Reverse-mode Autodiff in the sciml ecosystem. Why is it still being used for computing the sensitivities in DiffeqFlux?

---

## [ModelingToolkit @mtkmodel and loop on equations](https://discourse.julialang.org/t/modelingtoolkit-mtkmodel-and-loop-on-equations/113374)

<div class="topic-metadata">

**Author:** [@julien-dc](https://discourse.julialang.org/u/julien-dc)\
**Replies:** 3\
**Last updated:** [April 29, 2024, 5:16am UTC](https://discourse.julialang.org/t/modelingtoolkit-mtkmodel-and-loop-on-equations/113374 "2024-04-29T05:16:56Z")

</div>

Greetings Julia community, I’m currently exploring the possibility of transitioning from a Modelica/Python workflow to a fully Julia-based workflow for my projects. As I’m relatively new to Julia, I’ve encountered an is…

---

## [JuliaCon 2024 Event Locations](https://discourse.julialang.org/t/juliacon-2024-event-locations/113597)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 0\
**Last updated:** [April 29, 2024, 1:39am UTC](https://discourse.julialang.org/t/juliacon-2024-event-locations/113597 "2024-04-29T01:39:42Z")

</div>

For JuliaCon 2024, we will have multiple event locations: Tuesday July 9th, 2024, the workshops will be hosted TU Eindhoven Wednesday July 10th, 2024 to Friday July 12th, 2024 we will be at Philips Stadion Saturday Jul…

---

## [Tools for computer assisted proofs in analysis](https://discourse.julialang.org/t/tools-for-computer-assisted-proofs-in-analysis/113479)

<div class="topic-metadata">

**Author:** [@foobar\_lv2](https://discourse.julialang.org/u/foobar_lv2)\
**Replies:** 13\
**Last updated:** [April 29, 2024, 12:19am UTC](https://discourse.julialang.org/t/tools-for-computer-assisted-proofs-in-analysis/113479 "2024-04-29T00:19:30Z")

</div>

I wanted to ask somewhat open-ended on what tools and packages exist in julia (and outside of julia) for computer assisted “numerical” proofs, and whether you know of examples where this has been done in the julia ecosys…

---

## [Monitoring the progress of DiffEq solve](https://discourse.julialang.org/t/monitoring-the-progress-of-diffeq-solve/113579)

<div class="topic-metadata">

**Author:** [@cuihantao](https://discourse.julialang.org/u/cuihantao)\
**Replies:** 5\
**Last updated:** [April 28, 2024, 10:35pm UTC](https://discourse.julialang.org/t/monitoring-the-progress-of-diffeq-solve/113579 "2024-04-28T22:35:11Z")

</div>

The motivation is that, sometimes, solve(prob) takes long time to run. While running, DiffEq doesn’t print any output (even with debug logging on). There is no easy way to tell what’s going on, e.g., if it’s stuck at a …

---

## [Loading R packages not working anymore after updating R](https://discourse.julialang.org/t/loading-r-packages-not-working-anymore-after-updating-r/113592)

<div class="topic-metadata">

**Author:** [@Hugo](https://discourse.julialang.org/u/Hugo)\
**Replies:** 2\
**Last updated:** [April 28, 2024, 9:54pm UTC](https://discourse.julialang.org/t/loading-r-packages-not-working-anymore-after-updating-r/113592 "2024-04-28T21:54:11Z")

</div>

For a while, I had been calling R functionalities from my Julia code successfully with package RCall. Recently, however, I updated the version of my R installation, and now it seems the Julia code is broken. I should say…

---

## [Makie fails in my script but work in MWE](https://discourse.julialang.org/t/makie-fails-in-my-script-but-work-in-mwe/113594)

<div class="topic-metadata">

**Author:** [@TimG](https://discourse.julialang.org/u/TimG)\
**Replies:** 2\
**Last updated:** [April 28, 2024, 9:42pm UTC](https://discourse.julialang.org/t/makie-fails-in-my-script-but-work-in-mwe/113594 "2024-04-28T21:42:36Z")

</div>

I have an MWE as follows: using DataFrames import CairoMakie as Mke plotdf = DataFrame( nla=Int\[1, 2, 3, 4, 5, 6\], newLocalAuthority=String\["Liverpool", "Knowsley", "St. Helens", "Sefton", "Wirral", "Halton"\], …

---

## [Reducing getfield overhead?](https://discourse.julialang.org/t/reducing-getfield-overhead/113585)

<div class="topic-metadata">

**Author:** [@vavrines](https://discourse.julialang.org/u/vavrines)\
**Replies:** 2\
**Last updated:** [April 28, 2024, 8:51pm UTC](https://discourse.julialang.org/t/reducing-getfield-overhead/113585 "2024-04-28T20:51:08Z")

</div>

A MWE: using BenchmarkTools struct Get\_Field\_Test x::Vector{Float64} y::Vector{Float64} end ts = Vector{Get\_Field\_Test}(undef, 1000) for i in 1:1000 ts\[i\] = Get\_Field\_Test(rand(100), rand(100)) end functi…

---

## [Problem with LinearSolve.jl and PardisoJL()](https://discourse.julialang.org/t/problem-with-linearsolve-jl-and-pardisojl/113595)

<div class="topic-metadata">

**Author:** [@MichelJuillard](https://discourse.julialang.org/u/MichelJuillard)\
**Replies:** 2\
**Last updated:** [April 28, 2024, 8:27pm UTC](https://discourse.julialang.org/t/problem-with-linearsolve-jl-and-pardisojl/113595 "2024-04-28T20:27:15Z")

</div>

I encounter a problem using LinearSolve to solve a sparse linear system with PardisoJL(): The test case, test\_PardisoJL.jl: using Pkg Pkg.activate(; temp=true) Pkg.add("LinearSolve") Pkg.add("Pardiso") using LinearAlg…

---

## [How to broadcast for 3d-array?](https://discourse.julialang.org/t/how-to-broadcast-for-3d-array/113581)

<div class="topic-metadata">

**Author:** [@Kohei\_Hattori](https://discourse.julialang.org/u/Kohei_Hattori)\
**Replies:** 4\
**Last updated:** [April 28, 2024, 6:07pm UTC](https://discourse.julialang.org/t/how-to-broadcast-for-3d-array/113581 "2024-04-28T18:07:42Z")

</div>

This is a very amateur question, but how can I make the code to output a three-dimensional array when I broadcast to a variable like the one in the image in julia? I want the element specified by \[i,j,k\] in the three-dim…

---

## [Testing an api wrapper](https://discourse.julialang.org/t/testing-an-api-wrapper/111140)

<div class="topic-metadata">

**Author:** [@knbrt](https://discourse.julialang.org/u/knbrt)\
**Replies:** 1\
**Last updated:** [April 28, 2024, 5:11pm UTC](https://discourse.julialang.org/t/testing-an-api-wrapper/111140 "2024-04-28T17:11:21Z")

</div>

Hi there, currently I’m trying to write tests for an api wrapper I created. Of course I don’t want to actually call the RestAPI during testing. Luckily I discovered BrokenRecord.jl which is working nicely. But unfortunat…

---

## [Activating test dependencies?](https://discourse.julialang.org/t/activating-test-dependencies/48121)

<div class="topic-metadata">

**Author:** [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Replies:** 11\
**Last updated:** [February 21, 2022, 10:03am UTC](https://discourse.julialang.org/t/activating-test-dependencies/48121 "2022-02-21T10:03:09Z")

</div>

Is it possible to activate the extras/test dependencies of a project, e.g. for running tests manually/interactively (instead via Pkg.test())?

---

## [Error: failed to evaluate \`Modules =](https://discourse.julialang.org/t/error-failed-to-evaluate-modules/113583)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 5\
**Last updated:** [April 28, 2024, 2:23pm UTC](https://discourse.julialang.org/t/error-failed-to-evaluate-modules/113583 "2024-04-28T14:23:19Z")

</div>

I have a docs page with this autodocs field (without the comments): #\`\`\`@autodocs Modules = \[MolSimToolkit.Reweighting\] Pages = \["Reweighting/reweighting.jl"\] Order = \[:function, :type\] #\`\`\` The module Reweighting is i…

---

## [Simulating a stochastic volatility model with jumps using DifferentialEquations.jl and JumpProcesses.jl](https://discourse.julialang.org/t/simulating-a-stochastic-volatility-model-with-jumps-using-differentialequations-jl-and-jumpprocesses-jl/113534)

<div class="topic-metadata">

**Author:** [@colintbowers](https://discourse.julialang.org/u/colintbowers)\
**Replies:** 4\
**Last updated:** [April 28, 2024, 12:46pm UTC](https://discourse.julialang.org/t/simulating-a-stochastic-volatility-model-with-jumps-using-differentialequations-jl-and-jumpprocesses-jl/113534 "2024-04-28T12:46:29Z")

</div>

I’ve been using DifferentialEquations.jl to simulate the following stochastic volatility model: du\_t = 0 dt + v\_t ( -0.576 dW\_{1,t} + \\sqrt{1 - 0.576^2} dW\_{2,t}) dv\_t^2 = 0.035 (0.636 - v\_t^2) dt + 0 . 144 v\_t^2 dW\_{1…

---

## [How to append the docstring of a type or function in the upstream package in a downstream package](https://discourse.julialang.org/t/how-to-append-the-docstring-of-a-type-or-function-in-the-upstream-package-in-a-downstream-package/113418)

<div class="topic-metadata">

**Author:** [@kimikage](https://discourse.julialang.org/u/kimikage)\
**Replies:** 2\
**Last updated:** [April 28, 2024, 9:41am UTC](https://discourse.julialang.org/t/how-to-append-the-docstring-of-a-type-or-function-in-the-upstream-package-in-a-downstream-package/113418 "2024-04-28T09:41:06Z")

</div>

As an example, consider developing a downstream package like SpecificFoo.jl using upstream packages which provide APIs like FooBase.jl/FooCore.jl. We can write a docstring for the method defined in the downstream packag…

---

## [Data representation in StaticCompiler](https://discourse.julialang.org/t/data-representation-in-staticcompiler/113038)

<div class="topic-metadata">

**Author:** [@Thomas008](https://discourse.julialang.org/u/Thomas008)\
**Replies:** 3\
**Last updated:** [April 28, 2024, 8:46am UTC](https://discourse.julialang.org/t/data-representation-in-staticcompiler/113038 "2024-04-28T08:46:20Z")

</div>

I want to represent float numbers, integers and strings in a DataFrame or similar representation. I’d like to compile this with help of StaticCompiler to produce small executable binaries. How can I represent these data…

---

## [Is there a tutorial on \`JuMP\` extension development?](https://discourse.julialang.org/t/is-there-a-tutorial-on-jump-extension-development/113580)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 2\
**Last updated:** [April 28, 2024, 6:20am UTC](https://discourse.julialang.org/t/is-there-a-tutorial-on-jump-extension-development/113580 "2024-04-28T06:20:53Z")

</div>

Is there a tutorial on JuMP extension development? I’m curious about how to transform a naturally written model (similar to the JuMP modeling language) into a standardized format that is suitable for algorithmic solving. …

---

## [Performance discrepancy with multiple dispatch](https://discourse.julialang.org/t/performance-discrepancy-with-multiple-dispatch/113556)

<div class="topic-metadata">

**Author:** [@Albert\_de\_montserrat](https://discourse.julialang.org/u/Albert_de_montserrat)\
**Replies:** 4\
**Last updated:** [April 27, 2024, 11:07pm UTC](https://discourse.julialang.org/t/performance-discrepancy-with-multiple-dispatch/113556 "2024-04-27T23:07:26Z")

</div>

I am having problems trying to understand the difference in performance between the two foo methods described below. using Chairmarks abstract type AbstractTrait end struct ConcreteTrait \<: AbstractTrait end foo(::Arra…

---

## [How to extract the indices of a certain variable from a \`Vector{VariableRef}\`?](https://discourse.julialang.org/t/how-to-extract-the-indices-of-a-certain-variable-from-a-vector-variableref/113555)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 2\
**Last updated:** [April 28, 2024, 3:21am UTC](https://discourse.julialang.org/t/how-to-extract-the-indices-of-a-certain-variable-from-a-vector-variableref/113555 "2024-04-28T03:21:30Z")

</div>

using JuMP m = Model() @variable(m, x\[1:3\]) @variable(m, y\[1:5\]) v = all\_variables(m) v is an 8-element Vector{VariableRef}. Now I want to extract all the indices with respect to variable y from the vector v (e.g., it c…

---

## [Kwdef and empty constructor](https://discourse.julialang.org/t/kwdef-and-empty-constructor/113553)

<div class="topic-metadata">

**Author:** [@Stephen\_Vavasis](https://discourse.julialang.org/u/Stephen_Vavasis)\
**Replies:** 2\
**Last updated:** [April 28, 2024, 1:40am UTC](https://discourse.julialang.org/t/kwdef-and-empty-constructor/113553 "2024-04-28T01:40:18Z")

</div>

My code has a section analogous to: Base.@kwdef struct A a::Int end A() = A(a=1) This appeared to work well (Julia 1.9.2), but when I moved my code to a local package and started using \] dev and Revise, I received a…

---

## [How to eliminate a variable from a JuMP model?](https://discourse.julialang.org/t/how-to-eliminate-a-variable-from-a-jump-model/113557)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 1\
**Last updated:** [April 27, 2024, 10:30pm UTC](https://discourse.julialang.org/t/how-to-eliminate-a-variable-from-a-jump-model/113557 "2024-04-27T22:30:01Z")

</div>

For example, with the help of Polyhedra.jl one can eliminate variable y from model m (or project m onto x space) and obtain a polyhedron P with respect to x: using JuMP, Polyhedra, CDDLib m = Model() @variable(m, x) @va…

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

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