# Latest

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

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

**Page:** 901

---

## [Undirected to directed graph](https://discourse.julialang.org/t/undirected-to-directed-graph/88491)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 2\
**Last updated:** [October 9, 2022, 5:14pm UTC](https://discourse.julialang.org/t/undirected-to-directed-graph/88491 "2022-10-09T17:14:10Z")

</div>

I have an undirected graph. Is there a simple function or similar for converting it to a directed graph (where each edge is replaced by two edges, one in each direction)?

---

## [What's the difference between \`PackageCompiler.create\_sysimage()\` and \`Pkg.precompile()\`?](https://discourse.julialang.org/t/whats-the-difference-between-packagecompiler-create-sysimage-and-pkg-precompile/87589)

<div class="topic-metadata">

**Author:** [@bertulli](https://discourse.julialang.org/u/bertulli)\
**Replies:** 7\
**Last updated:** [October 9, 2022, 6:12am UTC](https://discourse.julialang.org/t/whats-the-difference-between-packagecompiler-create-sysimage-and-pkg-precompile/87589 "2022-10-09T06:12:48Z")

</div>

Hi all! Pretty much the title question. I’d like to try Julia for my Master’s thesis (it’s my first time with it), and I too was annoyed by the initial package loading time, especially if I want to quickly try some code…

---

## [Utilizing LP constraints structure with Tulip?](https://discourse.julialang.org/t/utilizing-lp-constraints-structure-with-tulip/88363)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 2\
**Last updated:** [October 8, 2022, 4:03pm UTC](https://discourse.julialang.org/t/utilizing-lp-constraints-structure-with-tulip/88363 "2022-10-08T16:03:54Z")

</div>

I’m solving many linear optimization problems that differ in variable bounds, but share the same constraints. There is no objective, i.e, I’m just looking for a feasible solution in each case. I’m using MultiFloats.Float…

---

## [How to Plot inside For Loop for Differential Equation](https://discourse.julialang.org/t/how-to-plot-inside-for-loop-for-differential-equation/88478)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 2\
**Last updated:** [October 9, 2022, 2:36pm UTC](https://discourse.julialang.org/t/how-to-plot-inside-for-loop-for-differential-equation/88478 "2022-10-09T14:36:35Z")

</div>

Hi all, I read this topic but it is not helping me to plot in a looping: I want to plot functions of: p = 900 +e^{t/2} p = 900 +50e^{t/2} p = 900 +100e^{t/2} p = 900 +150e^{t/2} p = 900 +200e^{t/2} p = 900 -50e…

---

## [How do I activate the test environment of a package?](https://discourse.julialang.org/t/how-do-i-activate-the-test-environment-of-a-package/86740)

<div class="topic-metadata">

**Author:** [@lamorton](https://discourse.julialang.org/u/lamorton)\
**Replies:** 5\
**Last updated:** [October 9, 2022, 1:17pm UTC](https://discourse.julialang.org/t/how-do-i-activate-the-test-environment-of-a-package/86740 "2022-10-09T13:17:38Z")

</div>

I want to do some testing of changes to a package I’ve deved. I activate the package environment, but it doesn’t have some imported packages I want to use during testing. (For concreteness, I’m working on ModelingToolkit …

---

## [ConvexBodyProximityQueries False Collision Detection and Proximity](https://discourse.julialang.org/t/convexbodyproximityqueries-false-collision-detection-and-proximity/88249)

<div class="topic-metadata">

**Author:** [@karelispanagiotis](https://discourse.julialang.org/u/karelispanagiotis)\
**Replies:** 2\
**Last updated:** [October 9, 2022, 12:36pm UTC](https://discourse.julialang.org/t/convexbodyproximityqueries-false-collision-detection-and-proximity/88249 "2022-10-09T12:36:20Z")

</div>

I have been using the package ConvexBodyProximityQueries and I cannot find the reason why it fails to calculate the distance between the following 3D Triangles. If I reverse the arguments order, I get the correct answer…

---

## [Create a new sheet in an excel file](https://discourse.julialang.org/t/create-a-new-sheet-in-an-excel-file/88432)

<div class="topic-metadata">

**Author:** [@Zizilabg](https://discourse.julialang.org/u/Zizilabg)\
**Replies:** 8\
**Last updated:** [October 9, 2022, 9:43am UTC](https://discourse.julialang.org/t/create-a-new-sheet-in-an-excel-file/88432 "2022-10-09T09:43:48Z")

</div>

Hello, I would like to create a new sheet in an excel file that already has two sheets. I wrote this but it erased all my data… Can someone explain me how to do it? XLSX.openxlsx("choix élèves julia.xlsx", mode="w") do…

---

## [Problem while precompiling \`Plots\` and \`StatsPlots\`](https://discourse.julialang.org/t/problem-while-precompiling-plots-and-statsplots/88413)

<div class="topic-metadata">

**Author:** [@Debartha\_Paul](https://discourse.julialang.org/u/Debartha_Paul)\
**Replies:** 3\
**Last updated:** [October 9, 2022, 7:29am UTC](https://discourse.julialang.org/t/problem-while-precompiling-plots-and-statsplots/88413 "2022-10-09T07:29:08Z")

</div>

I updated all the packages in my local system (using the update command in Pkg REPL) and since then onwards, I am facing a kind of precompilation issue while precompiling the Plots and StatsPlots packages. I decided to u…

---

## [Plots not working on Windows](https://discourse.julialang.org/t/plots-not-working-on-windows/88322)

<div class="topic-metadata">

**Author:** [@midori](https://discourse.julialang.org/u/midori)\
**Replies:** 12\
**Last updated:** [October 9, 2022, 7:25am UTC](https://discourse.julialang.org/t/plots-not-working-on-windows/88322 "2022-10-09T07:25:59Z")

</div>

I’m trying to use plots on Julia-1.8.2 ond Windows 10 but I get the following error: julia\> using Plots julia\> plot(sin) connect: No error GKS: can’t connect to GKS socket application GKS: Open failed in routine OPE…

---

## [Sudden, strong increase in compilation times, that is fixed by emptying \`~/.julia/compiled/\`](https://discourse.julialang.org/t/sudden-strong-increase-in-compilation-times-that-is-fixed-by-emptying-julia-compiled/88467)

<div class="topic-metadata">

**Author:** [@tfiers](https://discourse.julialang.org/u/tfiers)\
**Replies:** 2\
**Last updated:** [October 9, 2022, 5:43am UTC](https://discourse.julialang.org/t/sudden-strong-increase-in-compilation-times-that-is-fixed-by-emptying-julia-compiled/88467 "2022-10-09T05:43:55Z")

</div>

As it says in the title. Is this a known phenomenon? Specifics: Precompiling and loading a custom package of mine takes normally about 20 seconds max. One day, it started taking 130 seconds, without any substantial c…

---

## [Is there a way I can define custom method on this "function"?](https://discourse.julialang.org/t/is-there-a-way-i-can-define-custom-method-on-this-function/88466)

<div class="topic-metadata">

**Author:** [@Brian1](https://discourse.julialang.org/u/Brian1)\
**Replies:** 3\
**Last updated:** [October 9, 2022, 5:07am UTC](https://discourse.julialang.org/t/is-there-a-way-i-can-define-custom-method-on-this-function/88466 "2022-10-09T05:07:27Z")

</div>

a variable named a isa Missing or Float64. Which type it exactly belongs to would be known until runtime. So if I want to check b = 1 a \> 1 && b == 1 I have to: !ismissing(a) && a \> 1 && b == 1 So is there a way I…

---

## [In-place add to an array using duplicate indices](https://discourse.julialang.org/t/in-place-add-to-an-array-using-duplicate-indices/88464)

<div class="topic-metadata">

**Author:** [@cuihantao](https://discourse.julialang.org/u/cuihantao)\
**Replies:** 8\
**Last updated:** [October 9, 2022, 3:44am UTC](https://discourse.julialang.org/t/in-place-add-to-an-array-using-duplicate-indices/88464 "2022-10-09T03:44:23Z")

</div>

My code modifies an array in place using indices that contain duplicates. An MWE is as follows: out = zeros(5) mock\_addr = \[1, 1, 1, 1\] out\[mock\_addr\] += \[1, 2, 3, 4\] out The result is out = \[4, 0, 0, 0, 0\], which is t…

---

## [Matrix inverse in constraints in \`@NLconstraint\`](https://discourse.julialang.org/t/matrix-inverse-in-constraints-in-nlconstraint/88462)

<div class="topic-metadata">

**Author:** [@Rick](https://discourse.julialang.org/u/Rick)\
**Replies:** 3\
**Last updated:** [October 9, 2022, 3:29am UTC](https://discourse.julialang.org/t/matrix-inverse-in-constraints-in-nlconstraint/88462 "2022-10-09T03:29:13Z")

</div>

Hi, I have a question related to nonlinear optimization. I am trying to impose a nonlinear constraint that involves a matrix inversion. The matrix contains a variable of the optimization model. When I try to do this via…

---

## [VSCode Intellisense](https://discourse.julialang.org/t/vscode-intellisense/88202)

<div class="topic-metadata">

**Author:** [@sransome](https://discourse.julialang.org/u/sransome)\
**Replies:** 4\
**Last updated:** [October 9, 2022, 1:44am UTC](https://discourse.julialang.org/t/vscode-intellisense/88202 "2022-10-09T01:44:27Z")

</div>

Hi, I have been using Julia for a few years and never had intellisense working but now I want to try it. I have checked a bunch of settings, reinstalled Julia, the extension, and VSCode, rebooted heaps, but still I get…

---

## [Reduce the batches of a Parallel Ensemble Problem to the mean of the square modulus](https://discourse.julialang.org/t/reduce-the-batches-of-a-parallel-ensemble-problem-to-the-mean-of-the-square-modulus/88359)

<div class="topic-metadata">

**Author:** [@albertomercurio](https://discourse.julialang.org/u/albertomercurio)\
**Replies:** 8\
**Last updated:** [October 8, 2022, 11:21pm UTC](https://discourse.julialang.org/t/reduce-the-batches-of-a-parallel-ensemble-problem-to-the-mean-of-the-square-modulus/88359 "2022-10-08T23:21:11Z")

</div>

Hi, I’m performing a generic EnsembleProblem. Let’s take a simple example prob = ODEProblem((u,p,t)-\>1.01u,0.5,(0.0,1.0)) function prob\_func(prob,i,repeat) remake(prob,u0=rand()\*prob.u0) end ensemble\_prob = Ensembl…

---

## [Julia excitement is in the air!](https://discourse.julialang.org/t/julia-excitement-is-in-the-air/25045)

<div class="topic-metadata">

**Author:** [@tkluck](https://discourse.julialang.org/u/tkluck)\
**Replies:** 37\
**Last updated:** [October 8, 2022, 11:04pm UTC](https://discourse.julialang.org/t/julia-excitement-is-in-the-air/25045 "2022-10-08T23:04:12Z")

</div>

I’ve had a Julia sticker on my laptop for about a year now. For 11 months, no one noticed, but in just the last few weeks three random people have started a conversation about it. I’ll take that as anecdotal evidence tha…

---

## [Default keyword arguments Optimization.jl](https://discourse.julialang.org/t/default-keyword-arguments-optimization-jl/88271)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 9\
**Last updated:** [October 8, 2022, 10:46pm UTC](https://discourse.julialang.org/t/default-keyword-arguments-optimization-jl/88271 "2022-10-08T22:46:55Z")

</div>

What are the default keyword arguments for Optimization.solve shown here? Can anyone point out to that code in Github?

---

## [Debugging in JuMP](https://discourse.julialang.org/t/debugging-in-jump/88457)

<div class="topic-metadata">

**Author:** [@samerb](https://discourse.julialang.org/u/samerb)\
**Replies:** 1\
**Last updated:** [October 8, 2022, 10:39pm UTC](https://discourse.julialang.org/t/debugging-in-jump/88457 "2022-10-08T22:39:44Z")

</div>

(Soft Question): If I try to solve a problem in JuMP, and I get an error or a solution that doesn’t make sense, it usually means I incorrectly coded or misspecified the problem I was trying to solve. I can try to proofr…

---

## [Weird behaviour of "setdiff"](https://discourse.julialang.org/t/weird-behaviour-of-setdiff/88110)

<div class="topic-metadata">

**Author:** [@lionisxn](https://discourse.julialang.org/u/lionisxn)\
**Replies:** 10\
**Last updated:** [October 8, 2022, 9:14pm UTC](https://discourse.julialang.org/t/weird-behaviour-of-setdiff/88110 "2022-10-08T21:14:35Z")

</div>

I just found that the weird behaviour of “setdiff” in the 1.8.2, as can be seen in the following figure: I think the “correct” result should be ‘\[’, ‘1’, '1, ‘\]’. Such a minor change leads to unexpected behaviour of a…

---

## [Julia 1.8.2 sefaulting when trying to install a package](https://discourse.julialang.org/t/julia-1-8-2-sefaulting-when-trying-to-install-a-package/88461)

<div class="topic-metadata">

**Author:** [@prittjam](https://discourse.julialang.org/u/prittjam)\
**Replies:** 10\
**Last updated:** [October 8, 2022, 9:20pm UTC](https://discourse.julialang.org/t/julia-1-8-2-sefaulting-when-trying-to-install-a-package/88461 "2022-10-08T21:20:47Z")

</div>

This is a fresh install of 1.8.2. Julia 1.7.3 works fine and is stable. (@v1.8) pkg\> add LinearAlgebra signal (11): Segmentation fault in expression starting at none:0 \_\_pthread\_mutex\_init at /usr/lib/x86\_64-linux-gnu/…

---

## [Starting with Julia](https://discourse.julialang.org/t/starting-with-julia/88456)

<div class="topic-metadata">

**Author:** [@Arshad](https://discourse.julialang.org/u/Arshad)\
**Replies:** 7\
**Last updated:** [October 8, 2022, 7:50pm UTC](https://discourse.julialang.org/t/starting-with-julia/88456 "2022-10-08T19:50:30Z")

</div>

Hey Everyone Im Arshad Ariff from India .I am very interested in open source .I am very much willing to contribute can you please guide me ,i know DSA ,front end web dev and app dev how can i start my journey with julia

---

## [\[Makie\] Combining Colorbars](https://discourse.julialang.org/t/makie-combining-colorbars/88460)

<div class="topic-metadata">

**Author:** [@AstroBarker](https://discourse.julialang.org/u/AstroBarker)\
**Replies:** 1\
**Last updated:** [October 8, 2022, 6:47pm UTC](https://discourse.julialang.org/t/makie-combining-colorbars/88460 "2022-10-08T18:47:43Z")

</div>

I am using Makie to make a surface plot. However, I am constrained by the data layout to only plot one quarter at a time (resulting in four surface calls). What I need is a colorbar that represents the global figure, whe…

---

## [Basic JuMP Question](https://discourse.julialang.org/t/basic-jump-question/88451)

<div class="topic-metadata">

**Author:** [@samerb](https://discourse.julialang.org/u/samerb)\
**Replies:** 1\
**Last updated:** [October 8, 2022, 6:43pm UTC](https://discourse.julialang.org/t/basic-jump-question/88451 "2022-10-08T18:43:20Z")

</div>

I’m just trying to get a feel for how to use JuMP. I try model = Model(optimizer\_with\_attributes( Ipopt.Optimizer)) f(x) = x^2 register(model, :f, 1, f; autodiff = true) @variable(model, x) @NLconstrai…

---

## [Error in variables linear regression](https://discourse.julialang.org/t/error-in-variables-linear-regression/58109)

<div class="topic-metadata">

**Author:** [@Okarin99](https://discourse.julialang.org/u/Okarin99)\
**Replies:** 6\
**Last updated:** [October 8, 2022, 6:31pm UTC](https://discourse.julialang.org/t/error-in-variables-linear-regression/58109 "2022-10-08T18:31:51Z")

</div>

Hi, how can I do an error in variables regression in Julia? I didn‘t find anything online about this and I don‘t know what to do with the measurement uncertainties when I want to fit my model. Have a nice day and thank…

---

## [Human readable error messages](https://discourse.julialang.org/t/human-readable-error-messages/28789)

<div class="topic-metadata">

**Author:** [@hendri54](https://discourse.julialang.org/u/hendri54)\
**Replies:** 16\
**Last updated:** [October 8, 2022, 6:15pm UTC](https://discourse.julialang.org/t/human-readable-error-messages/28789 "2022-10-08T18:15:57Z")

</div>

I find run-time error messages that are displayed in the REPL hard to parse. Perhaps this could be improved fairly easily. But first I wanted to check whether I am the only one who feels this way. Here is a simple exam…

---

## [Distance to theoretical performance limit](https://discourse.julialang.org/t/distance-to-theoretical-performance-limit/88443)

<div class="topic-metadata">

**Author:** [@Yifan\_Liu](https://discourse.julialang.org/u/Yifan_Liu)\
**Replies:** 1\
**Last updated:** [October 8, 2022, 3:20pm UTC](https://discourse.julialang.org/t/distance-to-theoretical-performance-limit/88443 "2022-10-08T15:20:58Z")

</div>

Is it possible to know the distance to the theoretical performance limit for a function? The limit could be based on hardware, a fast benchmark language like C, or Julia itself. The reason I ask is that sometimes I wish…

---

## [RemoteChannel based Collective Operations](https://discourse.julialang.org/t/remotechannel-based-collective-operations/88453)

<div class="topic-metadata">

**Author:** [@charlescolley](https://discourse.julialang.org/u/charlescolley)\
**Replies:** 0\
**Last updated:** [October 8, 2022, 4:57pm UTC](https://discourse.julialang.org/t/remotechannel-based-collective-operations/88453 "2022-10-08T16:57:49Z")

</div>

I have a small collection of tree-based collectives that I’m using for some of my projects. I’m new to distributed algorithms and wanted to get some thoughts on the code I’ve written and the profiling I’ve done in hopes …

---

## [RollingFunctions with a variable window width](https://discourse.julialang.org/t/rollingfunctions-with-a-variable-window-width/87601)

<div class="topic-metadata">

**Author:** [@Derek\_Vetsch](https://discourse.julialang.org/u/Derek_Vetsch)\
**Replies:** 19\
**Last updated:** [October 8, 2022, 2:05pm UTC](https://discourse.julialang.org/t/rollingfunctions-with-a-variable-window-width/87601 "2022-10-08T14:05:49Z")

</div>

How do I go about applying a running function to a dataframe column with variable window length? Consider for example: using DataFrames, RollingFunctions df = DataFrame(:a =\> rand(100), :b =\> repeat(\[ x for x in 1:10 …

---

## [Fast way to access results in JuMP](https://discourse.julialang.org/t/fast-way-to-access-results-in-jump/88397)

<div class="topic-metadata">

**Author:** [@TBuConst](https://discourse.julialang.org/u/TBuConst)\
**Replies:** 4\
**Last updated:** [October 8, 2022, 12:50pm UTC](https://discourse.julialang.org/t/fast-way-to-access-results-in-jump/88397 "2022-10-08T12:50:15Z")

</div>

Hello everyone, say, I have a (pretty useless - just to illustrate the problem) MIP model in JuMP using JuMP using Cbc model = Model(Cbc.Optimizer) @variable(model, x\[1:100000, 1:10, 1:2\], Bin) @constraint(model, c\[i…

---

## [XGBoost reduce overfitting | k-fold cross validation](https://discourse.julialang.org/t/xgboost-reduce-overfitting-k-fold-cross-validation/88423)

<div class="topic-metadata">

**Author:** [@Seth16225](https://discourse.julialang.org/u/Seth16225)\
**Replies:** 1\
**Last updated:** [October 8, 2022, 12:25pm UTC](https://discourse.julialang.org/t/xgboost-reduce-overfitting-k-fold-cross-validation/88423 "2022-10-08T12:25:06Z")

</div>

Hello, I’m pretty new to machine learning, and I was using XGBoost.jl Regression. I’m in the process of trying to reduce overfitting through k-fold cross validation. I came across the nfold\_cv function, and I was wonder…

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

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