# Latest

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

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

**Page:** 1404

---

## [How to break several nested 'for' loop in one 'if'](https://discourse.julialang.org/t/how-to-break-several-nested-for-loop-in-one-if/32726)

<div class="topic-metadata">

**Author:** [@1634](https://discourse.julialang.org/u/1634)\
**Replies:** 18\
**Last updated:** [May 3, 2021, 11:57pm UTC](https://discourse.julialang.org/t/how-to-break-several-nested-for-loop-in-one-if/32726 "2021-05-03T23:57:46Z")

</div>

Hi community, Available manual and posts gave me some hints of break for ‘for’ loop. However, intending to break 2nd and 3rd ‘for’ loops and return to the 1st ‘for’ loop, two breaks don’t work here. s0=0.05; N=1e6; v…

---

## [DynamicHMC for Bayesian inference where product distribution is observed - Possible?](https://discourse.julialang.org/t/dynamichmc-for-bayesian-inference-where-product-distribution-is-observed-possible/60268)

<div class="topic-metadata">

**Author:** [@Adam\_Fleischhacker](https://discourse.julialang.org/u/Adam_Fleischhacker)\
**Replies:** 9\
**Last updated:** [May 3, 2021, 11:50pm UTC](https://discourse.julialang.org/t/dynamichmc-for-bayesian-inference-where-product-distribution-is-observed-possible/60268 "2021-05-03T23:50:48Z")

</div>

Here is a generative model I am working on. Think of a game show where your winnings are determined by the product of two RV’s: winningsMultiplier(X) and maxWinnings(Y). We observe winnings w\_i = x\_i \* y. Our prior o…

---

## [PlotlyJS not working in Pluto](https://discourse.julialang.org/t/plotlyjs-not-working-in-pluto/60389)

<div class="topic-metadata">

**Author:** [@VivMendes](https://discourse.julialang.org/u/VivMendes)\
**Replies:** 2\
**Last updated:** [May 3, 2021, 9:08pm UTC](https://discourse.julialang.org/t/plotlyjs-not-working-in-pluto/60389 "2021-05-03T21:08:26Z")

</div>

PlotlyJS.jl is a fantastic package for interactive plotting. It looks that using PlotlyJS with Pluto seems like a perfect match, but when I tried to use it I got the message: WebIO not detected. Is there anything I shoul…

---

## [How to "pull from the main branch"](https://discourse.julialang.org/t/how-to-pull-from-the-main-branch/60382)

<div class="topic-metadata">

**Author:** [@T-Shino-0603](https://discourse.julialang.org/u/T-Shino-0603)\
**Replies:** 2\
**Last updated:** [May 3, 2021, 8:23pm UTC](https://discourse.julialang.org/t/how-to-pull-from-the-main-branch/60382 "2021-05-03T20:23:00Z")

</div>

After doing " \]dev \*\*\*", how can I “pull from the main branch”? \*\*\* is the package name. Without doing so, some packages can not be imported.

---

## [Makie - connecting Slider to update a 2D slice \[matrix\] heatmap display of a 3D array](https://discourse.julialang.org/t/makie-connecting-slider-to-update-a-2d-slice-matrix-heatmap-display-of-a-3d-array/60477)

<div class="topic-metadata">

**Author:** [@Audrius-St](https://discourse.julialang.org/u/Audrius-St)\
**Replies:** 2\
**Last updated:** [May 3, 2021, 8:05pm UTC](https://discourse.julialang.org/t/makie-connecting-slider-to-update-a-2d-slice-matrix-heatmap-display-of-a-3d-array/60477 "2021-05-03T20:05:57Z")

</div>

Hello, I would like to connect a Slider to an heatmap display of a 2D slice, i.e, matrix, of a 3D array: a3DArray\[:, :, sliderValue\]. such that as the Slider is moved, a new 2D slice is selected/indexed and the 2D heat…

---

## [Help in using Callbacks](https://discourse.julialang.org/t/help-in-using-callbacks/60482)

<div class="topic-metadata">

**Author:** [@RaquelSantos](https://discourse.julialang.org/u/RaquelSantos)\
**Replies:** 1\
**Last updated:** [May 3, 2021, 7:19pm UTC](https://discourse.julialang.org/t/help-in-using-callbacks/60482 "2021-05-03T19:19:07Z")

</div>

Could someone please give me readings or small examples on how GLPK solver callbacks work? I would like to test on the model I’m building but I don’t know where to start. Thanks!

---

## [How to get ALL decision variables value?](https://discourse.julialang.org/t/how-to-get-all-decision-variables-value/60442)

<div class="topic-metadata">

**Author:** [@iiitr](https://discourse.julialang.org/u/iiitr)\
**Replies:** 6\
**Last updated:** [May 3, 2021, 7:18pm UTC](https://discourse.julialang.org/t/how-to-get-all-decision-variables-value/60442 "2021-05-03T19:18:19Z")

</div>

Hi all, I am new in Julia and JuMP.jl I have many decision variables, like, x1, x1, …x999, … if I want to obtain the value of all decision variables now, I may only use the codes as follows: x1 = value.(x1) x2 = val…

---

## [Plots.jl: Side-by-side subplots](https://discourse.julialang.org/t/plots-jl-side-by-side-subplots/60469)

<div class="topic-metadata">

**Author:** [@v-i-s-h](https://discourse.julialang.org/u/v-i-s-h)\
**Replies:** 5\
**Last updated:** [May 3, 2021, 7:17pm UTC](https://discourse.julialang.org/t/plots-jl-side-by-side-subplots/60469 "2021-05-03T19:17:57Z")

</div>

Hi, I want make 2 subplots with 2 function plots each in a 1-row 2-columns format. Below is a minimum working example for my use case. x = -2π:0.1:+2π y11 = sin.(x) y12 = sin.(x .+ 0.25π) y21 = cos.(x) y22 = sin.(x) .\*…

---

## [Just downloaded Julia, want to add Plots package, all I get is crashes](https://discourse.julialang.org/t/just-downloaded-julia-want-to-add-plots-package-all-i-get-is-crashes/60426)

<div class="topic-metadata">

**Author:** [@zamazalotta](https://discourse.julialang.org/u/zamazalotta)\
**Replies:** 14\
**Last updated:** [May 3, 2021, 7:14pm UTC](https://discourse.julialang.org/t/just-downloaded-julia-want-to-add-plots-package-all-i-get-is-crashes/60426 "2021-05-03T19:14:37Z")

</div>

Hello, I just downloaded Julia so I am a total noob. I click the Julia.exe then “\]” to enter the pkg \> REPL then I write “add Plots” press enter Since 20 minitues it is frozen in this stage I have no idea what I co…

---

## [Controlling pan and tilt servos from beaglebone](https://discourse.julialang.org/t/controlling-pan-and-tilt-servos-from-beaglebone/60464)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 5\
**Last updated:** [May 3, 2021, 5:31pm UTC](https://discourse.julialang.org/t/controlling-pan-and-tilt-servos-from-beaglebone/60464 "2021-05-03T17:31:21Z")

</div>

I want to control a LynxMotion pan and tilt unit from a BeagleBone using Julia, if possible. Ideally, I’d like to skip the use of a micro-controller altogether and communicate with the LynxMotion unit directly through th…

---

## [Debugger.jl: feature suggestion: Couldn't we make @bp work in compiled mode?](https://discourse.julialang.org/t/debugger-jl-feature-suggestion-couldnt-we-make-bp-work-in-compiled-mode/42327)

<div class="topic-metadata">

**Author:** [@chunkulator](https://discourse.julialang.org/u/chunkulator)\
**Replies:** 3\
**Last updated:** [May 3, 2021, 4:35pm UTC](https://discourse.julialang.org/t/debugger-jl-feature-suggestion-couldnt-we-make-bp-work-in-compiled-mode/42327 "2021-05-03T16:35:43Z")

</div>

In python it’s extremely easy to set a breakpoint. You just import pdb and then write pdb.set\_trace() in your code. Once you hit a breakpoint you can single set with n / s etc. Debugger.jl has the @bp macro to programma…

---

## [Broadcasting iterator?](https://discourse.julialang.org/t/broadcasting-iterator/60349)

<div class="topic-metadata">

**Author:** [@Benny](https://discourse.julialang.org/u/Benny)\
**Replies:** 6\
**Last updated:** [May 3, 2021, 4:17pm UTC](https://discourse.julialang.org/t/broadcasting-iterator/60349 "2021-05-03T16:17:59Z")

</div>

Say I have x = \[1 2\] y = \[10, 20, 30\] f(a,b) = a+b+0.5 I want an iterator that goes through the elements of f.(x,y) (11.5, 21.5, 31.5, …) without allocating the output array. Bonus points for an iterator that can also …

---

## [Invalid sink argument after upgrading to julia 1.6](https://discourse.julialang.org/t/invalid-sink-argument-after-upgrading-to-julia-1-6/60465)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 2\
**Last updated:** [May 3, 2021, 2:57pm UTC](https://discourse.julialang.org/t/invalid-sink-argument-after-upgrading-to-julia-1-6/60465 "2021-05-03T14:57:22Z")

</div>

I updated to Julia 1.6 by downloading the generic linux and moving them in the folder I keep julia. I launched atom, reinstalled all the packages (I need to do it every time I update, so I try to upgrade as little as pos…

---

## [RFC: JuliaTutor.jl](https://discourse.julialang.org/t/rfc-juliatutor-jl/43335)

<div class="topic-metadata">

**Author:** [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Replies:** 11\
**Last updated:** [May 3, 2021, 2:44pm UTC](https://discourse.julialang.org/t/rfc-juliatutor-jl/43335 "2021-05-03T14:44:30Z")

</div>

Hey all I tried kicking off some of the bones of a SWIRL like package in Julia. Basically you get someone totally new to julia to download a package which hand holds them through various lessons. So they can learn inte…

---

## [Undef array with customized index](https://discourse.julialang.org/t/undef-array-with-customized-index/60377)

<div class="topic-metadata">

**Author:** [@linwaytin](https://discourse.julialang.org/u/linwaytin)\
**Replies:** 17\
**Last updated:** [May 3, 2021, 2:17pm UTC](https://discourse.julialang.org/t/undef-array-with-customized-index/60377 "2021-05-03T14:17:11Z")

</div>

I’m curious if there is a convenient way to define an array with customized index. In fortran, we have real, dimension(2:6) :: array. I know in julia we can use Array{Float64}(undef, 10) to declare a 10-element array w…

---

## [PhD position: control architecture](https://discourse.julialang.org/t/phd-position-control-architecture/60463)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 0\
**Last updated:** [May 3, 2021, 1:42pm UTC](https://discourse.julialang.org/t/phd-position-control-architecture/60463 "2021-05-03T13:42:08Z")

</div>

A PhD position is available on methods/tools for “control architecture” design, with deadline May 23, 2021. For details, see PhD Research Fellow in Process, Energy and Automation Engineering (205482) | University of Sout…

---

## [\[ANN\] \`ConstructiveGeometry.jl\`: a package for CAD](https://discourse.julialang.org/t/ann-constructivegeometry-jl-a-package-for-cad/55810)

<div class="topic-metadata">

**Author:** [@circonflexe](https://discourse.julialang.org/u/circonflexe)\
**Replies:** 2\
**Last updated:** [May 3, 2021, 1:36pm UTC](https://discourse.julialang.org/t/ann-constructivegeometry-jl-a-package-for-cad/55810 "2021-05-03T13:36:23Z")

</div>

As announced a few weeks ago already, I started a package for defining CAD. The package is here and it should be able to perform a few simple designs already; there are a few examples included in the directory. Summary …

---

## [Scattering and gathering arrays](https://discourse.julialang.org/t/scattering-and-gathering-arrays/60345)

<div class="topic-metadata">

**Author:** [@francispoulin](https://discourse.julialang.org/u/francispoulin)\
**Replies:** 5\
**Last updated:** [May 3, 2021, 1:27pm UTC](https://discourse.julialang.org/t/scattering-and-gathering-arrays/60345 "2021-05-03T13:27:34Z")

</div>

I am trying to translate a python script that scatters aand gathers 2D arrays, as can be found here. python - Along what axis does mpi4py Scatterv function split a numpy array? - Stack Overflow I have managed to get som…

---

## [Periodic lattices with LightGraph](https://discourse.julialang.org/t/periodic-lattices-with-lightgraph/60454)

<div class="topic-metadata">

**Author:** [@Marco\_Antoniotti](https://discourse.julialang.org/u/Marco_Antoniotti)\
**Replies:** 2\
**Last updated:** [May 3, 2021, 1:09pm UTC](https://discourse.julialang.org/t/periodic-lattices-with-lightgraph/60454 "2021-05-03T13:09:20Z")

</div>

Hi just being lazy here… What would be the simplest way to produce a periodic lattice with LightGraphs? I.e. a “cylinder”. Thanks Marco

---

## [Writing custom LAPACK bindings](https://discourse.julialang.org/t/writing-custom-lapack-bindings/60338)

<div class="topic-metadata">

**Author:** [@PatrickS](https://discourse.julialang.org/u/PatrickS)\
**Replies:** 3\
**Last updated:** [May 3, 2021, 12:58pm UTC](https://discourse.julialang.org/t/writing-custom-lapack-bindings/60338 "2021-05-03T12:58:03Z")

</div>

Hi, I’m relatively new to Julia. I’ve been using it to prototype some linear algebra methods. I now have need for some LAPACK methods which are not included in LinearAlgebra.LAPACK, (specifically dtpqrt and dtpmqrt). I …

---

## [Import ONNX model](https://discourse.julialang.org/t/import-onnx-model/60260)

<div class="topic-metadata">

**Author:** [@March-08](https://discourse.julialang.org/u/March-08)\
**Replies:** 3\
**Last updated:** [May 3, 2021, 12:22pm UTC](https://discourse.julialang.org/t/import-onnx-model/60260 "2021-05-03T12:22:11Z")

</div>

Hi. I am having issues including ONNX models in my code. mnistnet = ONNX.load\_model("/user/mp/home/models/vision/classification/mnist/model/mnist-1.onnx") weights = ONNX.load\_weights("/user/mp/home/models/vision/classi…

---

## [Dynamically Create UI Elements](https://discourse.julialang.org/t/dynamically-create-ui-elements/60459)

<div class="topic-metadata">

**Author:** [@MLackner](https://discourse.julialang.org/u/MLackner)\
**Replies:** 0\
**Last updated:** [May 3, 2021, 12:11pm UTC](https://discourse.julialang.org/t/dynamically-create-ui-elements/60459 "2021-05-03T12:11:27Z")

</div>

Hi! I wonder if there’s a way to dynamically create UI elements like sliders. This would be helpful in the following use case: Assume you want to plot a polynomial and you want to let the user decide which degree N it …

---

## [No method matching loss\_multiple\_shooting](https://discourse.julialang.org/t/no-method-matching-loss-multiple-shooting/60445)

<div class="topic-metadata">

**Author:** [@raj6798](https://discourse.julialang.org/u/raj6798)\
**Replies:** 1\
**Last updated:** [May 3, 2021, 11:55am UTC](https://discourse.julialang.org/t/no-method-matching-loss-multiple-shooting/60445 "2021-05-03T11:55:07Z")

</div>

using DataDrivenDiffEq using DiffEqFlux, Flux using Plots path = @DIR include(“multipleshooting.jl”) Mutliple shoot function #include(“Multiple\_shooting1.jl”) generating possible basis @variables x\[1:ns\] # variabl…

---

## [How to specify text in Plots? (font family, font size, etc.)](https://discourse.julialang.org/t/how-to-specify-text-in-plots-font-family-font-size-etc/60311)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 3\
**Last updated:** [May 3, 2021, 7:44am UTC](https://discourse.julialang.org/t/how-to-specify-text-in-plots-font-family-font-size-etc/60311 "2021-05-03T07:44:29Z")

</div>

Suppose I have a plot using package Plots.jl, and I specify the title: plot!(title="My title") How do I modify the font family, font style, font size, etc.? A link to where in the documentation would do.

---

## [When Should One Use \`(...)\` or \`\[...\]\` for Array Comprehensions](https://discourse.julialang.org/t/when-should-one-use-or-for-array-comprehensions/60423)

<div class="topic-metadata">

**Author:** [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Replies:** 3\
**Last updated:** [May 3, 2021, 7:11am UTC](https://discourse.julialang.org/t/when-should-one-use-or-for-array-comprehensions/60423 "2021-05-03T07:11:11Z")

</div>

When Should One Use (...) or \[...\] for Array Comprehensions? What is the difference between the 2? From Slack: julia\> @btime \[x^2 for x in 1:10000\]; 6.519 μs (2 allocations: 78.20 KiB)julia\> @btime (x^2 for x in 1:1…

---

## [Calling \`first(some\_set)\` gets me "ArgumentError: collection must be non-empty", even though I checked the Set for emptiness immediately before](https://discourse.julialang.org/t/calling-first-some-set-gets-me-argumenterror-collection-must-be-non-empty-even-though-i-checked-the-set-for-emptiness-immediately-before/60449)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 2\
**Last updated:** [May 3, 2021, 10:36am UTC](https://discourse.julialang.org/t/calling-first-some-set-gets-me-argumenterror-collection-must-be-non-empty-even-though-i-checked-the-set-for-emptiness-immediately-before/60449 "2021-05-03T10:36:18Z")

</div>

This is Julia 1.6.1. I hit an error that seems really weird right now. The code’s basically like this: loop if isempty(some\_set) # Change some\_set # ... conti…

---

## [Sparse Jacobian with dense blocks in differentialEquations.jl or otherwise](https://discourse.julialang.org/t/sparse-jacobian-with-dense-blocks-in-differentialequations-jl-or-otherwise/60430)

<div class="topic-metadata">

**Author:** [@ziolai](https://discourse.julialang.org/u/ziolai)\
**Replies:** 2\
**Last updated:** [May 3, 2021, 8:26am UTC](https://discourse.julialang.org/t/sparse-jacobian-with-dense-blocks-in-differentialequations-jl-or-otherwise/60430 "2021-05-03T08:26:13Z")

</div>

Dear all, I am planning to use differentialEquations.jl to solve a stiff system of ordinary differential equations in which the Jacobian is sparse with dense blocks. Such systems are well known in this community as they…

---

## [Uninstalled dependency error when starting with -p flag](https://discourse.julialang.org/t/uninstalled-dependency-error-when-starting-with-p-flag/60305)

<div class="topic-metadata">

**Author:** [@altre](https://discourse.julialang.org/u/altre)\
**Replies:** 2\
**Last updated:** [May 3, 2021, 7:00am UTC](https://discourse.julialang.org/t/uninstalled-dependency-error-when-starting-with-p-flag/60305 "2021-05-03T07:00:35Z")

</div>

A similar problem has been discussed here, but I think this is subtly different: Say I have a project with the following simple Project.toml after running add Catwalk in the current Project: \[deps\] Catwalk = "860e6890…

---

## [Floating subplot in Plots recipe?](https://discourse.julialang.org/t/floating-subplot-in-plots-recipe/60441)

<div class="topic-metadata">

**Author:** [@jdh62043](https://discourse.julialang.org/u/jdh62043)\
**Replies:** 1\
**Last updated:** [May 3, 2021, 5:43am UTC](https://discourse.julialang.org/t/floating-subplot-in-plots-recipe/60441 "2021-05-03T05:43:35Z")

</div>

I am making a user recipe for Plots to visualize a struct representing a spectrum: Currently, this works by having three subplots stacked vertically. Here is the relevant code in the recipe: grid := false fr…

---

## [When I declare an empty array, what does the output given by the typeof method mean?](https://discourse.julialang.org/t/when-i-declare-an-empty-array-what-does-the-output-given-by-the-typeof-method-mean/47546)

<div class="topic-metadata">

**Author:** [@anon60034542](https://discourse.julialang.org/u/anon60034542)\
**Replies:** 17\
**Last updated:** [May 3, 2021, 3:17am UTC](https://discourse.julialang.org/t/when-i-declare-an-empty-array-what-does-the-output-given-by-the-typeof-method-mean/47546 "2021-05-03T03:17:49Z")

</div>

When I declare an empty array and call typeof(), I get the following output: numbers = \[\] println(typeof(numbers)) # Output: Array{Any,1} What does the 1 mean in this case? Does it mean it’s a one dimensional array? D…

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

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