# Latest

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

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

**Page:** 449

---

## [Is it possible to define a type-stable function that returns a Plots.Plot object?](https://discourse.julialang.org/t/is-it-possible-to-define-a-type-stable-function-that-returns-a-plots-plot-object/112172)

<div class="topic-metadata">

**Author:** [@Shayan](https://discourse.julialang.org/u/Shayan)\
**Replies:** 3\
**Last updated:** [March 27, 2024, 1:24pm UTC](https://discourse.julialang.org/t/is-it-possible-to-define-a-type-stable-function-that-returns-a-plots-plot-object/112172 "2024-03-27T13:24:54Z")

</div>

Is it possible to define a type stable function that returns a Plots.plot object? Minimal reproducible example: using Plots function mplot(vec::AbstractVector) plot(vec) end @code\_warntype mplot(rand(10)) returns …

---

## [What are IFFxM methods is StochasticDiffEq.jl?](https://discourse.julialang.org/t/what-are-iffxm-methods-is-stochasticdiffeq-jl/111899)

<div class="topic-metadata">

**Author:** [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Replies:** 1\
**Last updated:** [March 27, 2024, 9:12am UTC](https://discourse.julialang.org/t/what-are-iffxm-methods-is-stochasticdiffeq-jl/111899 "2024-03-27T09:12:34Z")

</div>

What are these methods in StochasticDiffEq.jl and in which papers are they described? They are declared and implemented, but they seem to be undocumented. Or have a different name.

---

## [3D Maze and WordSearch Games](https://discourse.julialang.org/t/3d-maze-and-wordsearch-games/112173)

<div class="topic-metadata">

**Author:** [@HAL9000](https://discourse.julialang.org/u/HAL9000)\
**Replies:** 0\
**Last updated:** [March 27, 2024, 9:06am UTC](https://discourse.julialang.org/t/3d-maze-and-wordsearch-games/112173 "2024-03-27T09:06:10Z")

</div>

To learn Julia, I have written a couple of games with GameZero. These can be found at GitHub - DavidBloomfield/JuliaGames: Games written in Julia. One is a 3D Maze game with a procedurally generated map and raycasting …

---

## [MethodError: no method matching Adam(::Float64)](https://discourse.julialang.org/t/methoderror-no-method-matching-adam-float64/112009)

<div class="topic-metadata">

**Author:** [@sharmaviven1](https://discourse.julialang.org/u/sharmaviven1)\
**Replies:** 7\
**Last updated:** [March 27, 2024, 8:08am UTC](https://discourse.julialang.org/t/methoderror-no-method-matching-adam-float64/112009 "2024-03-27T08:08:39Z")

</div>

Hello all, I have been trying to setup NeuralODE to learn the behavior of a stiff ODE but in the process I am running into this strange error. I have tried using all Float32 values only but it seems that there is some i…

---

## [Inferring missing values in a Turing.jl model](https://discourse.julialang.org/t/inferring-missing-values-in-a-turing-jl-model/112166)

<div class="topic-metadata">

**Author:** [@affans](https://discourse.julialang.org/u/affans)\
**Replies:** 1\
**Last updated:** [March 27, 2024, 4:48am UTC](https://discourse.julialang.org/t/inferring-missing-values-in-a-turing-jl-model/112166 "2024-03-27T04:48:15Z")

</div>

I have a very simple model that doesn’t seem to work when I try to infer values for missing variable. I will try to explain the model and provide fully reproducible, self-contained code. I know it’s long post but I’ve br…

---

## [Seeking Feedback on Robust Solution for Consistent but ill-conditioned Linear System with Real Symmetric Positive Semidefinite Matrices](https://discourse.julialang.org/t/seeking-feedback-on-robust-solution-for-consistent-but-ill-conditioned-linear-system-with-real-symmetric-positive-semidefinite-matrices/111957)

<div class="topic-metadata">

**Author:** [@swanchristmas](https://discourse.julialang.org/u/swanchristmas)\
**Replies:** 1\
**Last updated:** [March 27, 2024, 2:45am UTC](https://discourse.julialang.org/t/seeking-feedback-on-robust-solution-for-consistent-but-ill-conditioned-linear-system-with-real-symmetric-positive-semidefinite-matrices/111957 "2024-03-27T02:45:18Z")

</div>

Hello everyone, I’m currently grappling with a challenging problem involving a linear system that’s consistent but ill-conditioned due to the nature of the matrices involved. I’ve devised a potential solution, but I’m s…

---

## [Implementing a squarewave: Can't take remainder of InfiniteOpt.GeneralVariableRef](https://discourse.julialang.org/t/implementing-a-squarewave-cant-take-remainder-of-infiniteopt-generalvariableref/111955)

<div class="topic-metadata">

**Author:** [@lpz18](https://discourse.julialang.org/u/lpz18)\
**Replies:** 1\
**Last updated:** [March 27, 2024, 1:50am UTC](https://discourse.julialang.org/t/implementing-a-squarewave-cant-take-remainder-of-infiniteopt-generalvariableref/111955 "2024-03-27T01:50:25Z")

</div>

I have a squarewave implemented like so: function sqw(t; period::Float64=1, duty::Float64=0.5) return t % period \< duty\*period ? 1.0 : 0.0 end I am running an InfiniteOpt.jl optimization where I pass in sqw as a param…

---

## [Callback function to set negative values to zero](https://discourse.julialang.org/t/callback-function-to-set-negative-values-to-zero/111902)

<div class="topic-metadata">

**Author:** [@Nick1](https://discourse.julialang.org/u/Nick1)\
**Replies:** 8\
**Last updated:** [March 26, 2024, 11:52pm UTC](https://discourse.julialang.org/t/callback-function-to-set-negative-values-to-zero/111902 "2024-03-26T23:52:33Z")

</div>

I have an ODE system of 60 equations and run multiple simulations with different sets of parameters. I want to prevent the outputs from taking any negative values since it is not physically plausible. I currently use som…

---

## [What is the equivalent Julia code for statsmodels.api.OLS](https://discourse.julialang.org/t/what-is-the-equivalent-julia-code-for-statsmodels-api-ols/112070)

<div class="topic-metadata">

**Author:** [@Shayan](https://discourse.julialang.org/u/Shayan)\
**Replies:** 15\
**Last updated:** [March 26, 2024, 10:17pm UTC](https://discourse.julialang.org/t/what-is-the-equivalent-julia-code-for-statsmodels-api-ols/112070 "2024-03-26T22:17:58Z")

</div>

I want to write the equivalent Julia code for the following Python code: import statsmodels.api as sm reg = sm.OLS(Y,sm.add\_constant(X)) res = reg.fit() res.params\[1\]/res.bse\[1\] The copilot asserts that the equivalent …

---

## [How to speed up model generation in JuMP?](https://discourse.julialang.org/t/how-to-speed-up-model-generation-in-jump/112050)

<div class="topic-metadata">

**Author:** [@SantoshSharma](https://discourse.julialang.org/u/SantoshSharma)\
**Replies:** 7\
**Last updated:** [March 26, 2024, 8:59pm UTC](https://discourse.julialang.org/t/how-to-speed-up-model-generation-in-jump/112050 "2024-03-26T20:59:56Z")

</div>

I have a large-scale scenarios-based optimization model that takes a long time to solve on JuMP and Julia using the Gurobi solver. While solving the constructed model using Gurobi (as it uses all available cores) is quic…

---

## [Advices on giving a workshop using Julia to non-programmers](https://discourse.julialang.org/t/advices-on-giving-a-workshop-using-julia-to-non-programmers/112055)

<div class="topic-metadata">

**Author:** [@vituri](https://discourse.julialang.org/u/vituri)\
**Replies:** 12\
**Last updated:** [March 26, 2024, 8:53pm UTC](https://discourse.julialang.org/t/advices-on-giving-a-workshop-using-julia-to-non-programmers/112055 "2024-03-26T20:53:19Z")

</div>

Hi! In July I will be giving a workshop called “Topological Data Analysis with Julia”, at the “Brazilian Topology Meeting”. This is a famous event in Brazil that reunites many of the leading topologists in the world. Mo…

---

## [CPLEX - Setting branching priority](https://discourse.julialang.org/t/cplex-setting-branching-priority/11644)

<div class="topic-metadata">

**Author:** [@Lefteris\_Manousakis](https://discourse.julialang.org/u/Lefteris_Manousakis)\
**Replies:** 9\
**Last updated:** [March 26, 2024, 7:41pm UTC](https://discourse.julialang.org/t/cplex-setting-branching-priority/11644 "2024-03-26T19:41:37Z")

</div>

Hi all! I have been trying to set branching priority (in CPLEX) for a set of my variables (z) but I cannot do it. I tried using the linear indices and the internal model, but I get a method not found error. Source cod…

---

## [How to convert a raw string to escape $](https://discourse.julialang.org/t/how-to-convert-a-raw-string-to-escape/112141)

<div class="topic-metadata">

**Author:** [@Simone\_Gabbriellini](https://discourse.julialang.org/u/Simone_Gabbriellini)\
**Replies:** 3\
**Last updated:** [March 26, 2024, 7:24pm UTC](https://discourse.julialang.org/t/how-to-convert-a-raw-string-to-escape/112141 "2024-03-26T19:24:36Z")

</div>

I have a situation where I am making a call to OpenAI and I get back a string, which might contain a $ like in “the price of the ticket is 10$”. My problem is how to articulate the escape of the $ sign: raw\_string = r"…

---

## [Failed to precompile Plots due to InitError in libgobject-2.0.so: undefined symbol g\_pattern\_spec\_copy](https://discourse.julialang.org/t/failed-to-precompile-plots-due-to-initerror-in-libgobject-2-0-so-undefined-symbol-g-pattern-spec-copy/88900)

<div class="topic-metadata">

**Author:** [@clarakoehne](https://discourse.julialang.org/u/clarakoehne)\
**Replies:** 9\
**Last updated:** [December 17, 2023, 2:43am UTC](https://discourse.julialang.org/t/failed-to-precompile-plots-due-to-initerror-in-libgobject-2-0-so-undefined-symbol-g-pattern-spec-copy/88900 "2023-12-17T02:43:02Z")

</div>

Hello all! I am getting an error when I try to run my julia project on a high-performance cluster. I installed julia v1.8.2 using conda (conda create --name myenv julia; conda activate myenv) and instantiated my project …

---

## [Questionable Zygote gradients for quantum optimal control problem](https://discourse.julialang.org/t/questionable-zygote-gradients-for-quantum-optimal-control-problem/112060)

<div class="topic-metadata">

**Author:** [@goerz](https://discourse.julialang.org/u/goerz)\
**Replies:** 6\
**Last updated:** [March 26, 2024, 6:06pm UTC](https://discourse.julialang.org/t/questionable-zygote-gradients-for-quantum-optimal-control-problem/112060 "2024-03-26T18:06:32Z")

</div>

I’m testing out a gradient-based optimization of some (quantum) dynamical system using AD over a simulation with OrdinaryDiffEq. The “quantum” here really just means that the dynamical state is complex-valued, not real-v…

---

## [Writing dataframes or arrays from Julia to excel file](https://discourse.julialang.org/t/writing-dataframes-or-arrays-from-julia-to-excel-file/112096)

<div class="topic-metadata">

**Author:** [@ssrrii](https://discourse.julialang.org/u/ssrrii)\
**Replies:** 12\
**Last updated:** [March 26, 2024, 5:30pm UTC](https://discourse.julialang.org/t/writing-dataframes-or-arrays-from-julia-to-excel-file/112096 "2024-03-26T17:30:59Z")

</div>

I have four data frames (D1, …, D4) usually having fixed number of columns, but varying numer of rows. I would like to write them next to each other to a single new sheet in an existing xlsx file. I use the packages XLSX…

---

## [Can't concatenate a matrix to \`Any\[\]\` horizontally](https://discourse.julialang.org/t/cant-concatenate-a-matrix-to-any-horizontally/112152)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 9\
**Last updated:** [March 26, 2024, 5:18pm UTC](https://discourse.julialang.org/t/cant-concatenate-a-matrix-to-any-horizontally/112152 "2024-03-26T17:18:23Z")

</div>

Block1: a = \[\] b = \[1 2; 3 4\] a = vcat(a, b) # or a = \[a; b\] Block2: a = \[\] b = \[1 2; 3 4\] a = hcat(a, b) # or a = \[a b\] Question: Block1 works but Block2 doesn’t. Why?

---

## [How to fix this Precompile error for ITensors](https://discourse.julialang.org/t/how-to-fix-this-precompile-error-for-itensors/112135)

<div class="topic-metadata">

**Author:** [@vikram\_backup](https://discourse.julialang.org/u/vikram_backup)\
**Replies:** 4\
**Last updated:** [March 26, 2024, 5:18pm UTC](https://discourse.julialang.org/t/how-to-fix-this-precompile-error-for-itensors/112135 "2024-03-26T17:18:05Z")

</div>

I am getting the following error Failed to precompile ITensors \[9136182c-28ba-11e9-034c-db9fb085ebd5\] to ... ERROR: LoadError: UndefVarError: \`Unwrap\` not defined I was adding the package Makie, OrdinaryDiffEq, Dynamic…

---

## [From Python to Julia](https://discourse.julialang.org/t/from-python-to-julia/112137)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 6\
**Last updated:** [March 26, 2024, 4:01pm UTC](https://discourse.julialang.org/t/from-python-to-julia/112137 "2024-03-26T16:01:01Z")

</div>

I am working now in a team of researchers that mainly use Python. How can I explain that I am happy that Julia is not object oriented? I said that classes are replaced by structs and types. There is a type hierarchy, bu…

---

## [Maven Securities - HFT Systems Developer](https://discourse.julialang.org/t/maven-securities-hft-systems-developer/17517)

<div class="topic-metadata">

**Author:** [@Christian\_Rorvik](https://discourse.julialang.org/u/Christian_Rorvik)\
**Replies:** 7\
**Last updated:** [March 26, 2024, 3:33pm UTC](https://discourse.julialang.org/t/maven-securities-hft-systems-developer/17517 "2024-03-26T15:33:14Z")

</div>

Julia is an increasingly important part of what we do, both in the research stack and the runtime, so now seemed a good time to reach out to users here for anyone who might be interested in trading and finance. We are …

---

## [Is it possibly to do atomic update on an array element?](https://discourse.julialang.org/t/is-it-possibly-to-do-atomic-update-on-an-array-element/112113)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 14\
**Last updated:** [March 26, 2024, 3:28pm UTC](https://discourse.julialang.org/t/is-it-possibly-to-do-atomic-update-on-an-array-element/112113 "2024-03-26T15:28:40Z")

</div>

The manual seems to read “primitive type values only”. Also, just above that section is “API is deprecated”. Does anyone has an insight into this?

---

## [Should you use @spawnat/@everywhere within a package? (Distributed.jl)](https://discourse.julialang.org/t/should-you-use-spawnat-everywhere-within-a-package-distributed-jl/112134)

<div class="topic-metadata">

**Author:** [@Rutger0000](https://discourse.julialang.org/u/Rutger0000)\
**Replies:** 1\
**Last updated:** [March 26, 2024, 2:39pm UTC](https://discourse.julialang.org/t/should-you-use-spawnat-everywhere-within-a-package-distributed-jl/112134 "2024-03-26T14:39:34Z")

</div>

How should a package use Distributed.jl? The goal is that you have a package with some functions, and then you execute MyPackage.run() in your main process and the package in the background does all the ‘clever’ parallel…

---

## [AD of Neural ODEs with \`SplitODEProblem\` using Zygote or Enzyme](https://discourse.julialang.org/t/ad-of-neural-odes-with-splitodeproblem-using-zygote-or-enzyme/112114)

<div class="topic-metadata">

**Author:** [@xkykai](https://discourse.julialang.org/u/xkykai)\
**Replies:** 1\
**Last updated:** [March 26, 2024, 2:29pm UTC](https://discourse.julialang.org/t/ad-of-neural-odes-with-splitodeproblem-using-zygote-or-enzyme/112114 "2024-03-26T14:29:53Z")

</div>

Hello, I am trying to perform AD in the Neural ODE setup using a SplitODEProblem as it is a PDE discretization of the diffusion equation which is rather stiff when using explicit timesteppers. The neural network appears …

---

## [Beyond Python: Julia and The New Path Forward for HPC and Technical Computing](https://discourse.julialang.org/t/beyond-python-julia-and-the-new-path-forward-for-hpc-and-technical-computing/111722)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 6\
**Last updated:** [March 26, 2024, 2:22pm UTC](https://discourse.julialang.org/t/beyond-python-julia-and-the-new-path-forward-for-hpc-and-technical-computing/111722 "2024-03-26T14:22:52Z")

</div>

Beyond Python: Julia and The New Path Forward for HPC and Technical Computing WEDNESDAY, MARCH 20 10:00AM CT Join us next week, Wednesday, March 20, at 10:00 a.m. CT for our next Dell Technologies HPC & AI Community eve…

---

## [Comparing times in a dataframe](https://discourse.julialang.org/t/comparing-times-in-a-dataframe/112131)

<div class="topic-metadata">

**Author:** [@Marc\_Sevaux](https://discourse.julialang.org/u/Marc_Sevaux)\
**Replies:** 2\
**Last updated:** [March 26, 2024, 11:31am UTC](https://discourse.julialang.org/t/comparing-times-in-a-dataframe/112131 "2024-03-26T11:31:22Z")

</div>

Dear all, I am not very comfortable with time formats. I have the following dataframe. ┌─────────┬──────────┐ │ id\_site │ hour │ │ String7 │ Time │ ├─────────┼──────────┤ │ BAN4 │ 08:48:00 │ │ BAN4 │ 08:5…

---

## [Number of each unique value in an array](https://discourse.julialang.org/t/number-of-each-unique-value-in-an-array/58627)

<div class="topic-metadata">

**Author:** [@tgautam03](https://discourse.julialang.org/u/tgautam03)\
**Replies:** 4\
**Last updated:** [March 26, 2024, 7:58am UTC](https://discourse.julialang.org/t/number-of-each-unique-value-in-an-array/58627 "2024-03-26T07:58:50Z")

</div>

Hi, I’m new to Julia and converting my existing python code to julia. I often use np.unique with return\_counts=True to get all unique values and the number of times each one appears in an array. I’m trying to find an al…

---

## [Stream help in Genie](https://discourse.julialang.org/t/stream-help-in-genie/111531)

<div class="topic-metadata">

**Author:** [@smith-isaac](https://discourse.julialang.org/u/smith-isaac)\
**Replies:** 12\
**Last updated:** [March 26, 2024, 7:51am UTC](https://discourse.julialang.org/t/stream-help-in-genie/111531 "2024-03-26T07:51:17Z")

</div>

Hi everyone! For some background, I am trying to set up a little site using the Genie Framework where I can watch livestreams of my 3D printer as well as start timelapses, and be able to review and download the timelaps…

---

## [Error while using \`Pkg.instantiate()\`](https://discourse.julialang.org/t/error-while-using-pkg-instantiate/112103)

<div class="topic-metadata">

**Author:** [@Devansh1106](https://discourse.julialang.org/u/Devansh1106)\
**Replies:** 3\
**Last updated:** [March 26, 2024, 5:17am UTC](https://discourse.julialang.org/t/error-while-using-pkg-instantiate/112103 "2024-03-26T05:17:20Z")

</div>

I ran these commands: import Pkg Pkg.instantiate() Got some warnings and precompiling got stuck julia\> import Pkg; Pkg.instantiate() ┌ Warning: attempting to remove probably stale pidfile │ path = "/home/devansh/…

---

## [Biotools instalation](https://discourse.julialang.org/t/biotools-instalation/112116)

<div class="topic-metadata">

**Author:** [@perrochico](https://discourse.julialang.org/u/perrochico)\
**Replies:** 6\
**Last updated:** [March 26, 2024, 4:00am UTC](https://discourse.julialang.org/t/biotools-instalation/112116 "2024-03-26T04:00:05Z")

</div>

Hello! i have a situation installation Biotools and idk even what is about. A screenshoot of my problem

---

## [Ensure type stability when using OrdinaryDiffEq](https://discourse.julialang.org/t/ensure-type-stability-when-using-ordinarydiffeq/112068)

<div class="topic-metadata">

**Author:** [@ChenPhy](https://discourse.julialang.org/u/ChenPhy)\
**Replies:** 5\
**Last updated:** [March 26, 2024, 2:09am UTC](https://discourse.julialang.org/t/ensure-type-stability-when-using-ordinarydiffeq/112068 "2024-03-26T02:09:17Z")

</div>

Hi, I am trying to solve large numbers of ODEs and my approach is to put solving the equations part into a function and it should spit out the relevant numbers/arrays. Using some a simple equation, it is akin to the fol…

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

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