# Latest

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

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

**Page:** 1333

---

## [Julia: how to run embarrassingly parallel jobs with nested for loops?](https://discourse.julialang.org/t/julia-how-to-run-embarrassingly-parallel-jobs-with-nested-for-loops/64410)

<div class="topic-metadata">

**Author:** [@erwanlecarpentier](https://discourse.julialang.org/u/erwanlecarpentier)\
**Replies:** 6\
**Last updated:** [July 13, 2021, 9:22am UTC](https://discourse.julialang.org/t/julia-how-to-run-embarrassingly-parallel-jobs-with-nested-for-loops/64410 "2021-07-13T09:22:03Z")

</div>

Hey! I’d like to run 4 independent tasks in parallel for a certain number of times using 4 cores. Here is the script, say test.jl, that I run with the command julia --threads 4 test.jl: using Distributed function remot…

---

## [Juno keybindings stopped working in VSCode](https://discourse.julialang.org/t/juno-keybindings-stopped-working-in-vscode/64552)

<div class="topic-metadata">

**Author:** [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Replies:** 11\
**Last updated:** [July 13, 2021, 8:43am UTC](https://discourse.julialang.org/t/juno-keybindings-stopped-working-in-vscode/64552 "2021-07-13T08:43:56Z")

</div>

Had another go at switching to VSCode yesterday, and somehow managed to make the experience worse: I’m using the Juno keybindings from here in my keybindings.json, but for some reason they’ve stopped working. WIth an em…

---

## [Why these two functions have different allocations?](https://discourse.julialang.org/t/why-these-two-functions-have-different-allocations/64517)

<div class="topic-metadata">

**Author:** [@Fred\_He](https://discourse.julialang.org/u/Fred_He)\
**Replies:** 11\
**Last updated:** [July 13, 2021, 8:19am UTC](https://discourse.julialang.org/t/why-these-two-functions-have-different-allocations/64517 "2021-07-13T08:19:39Z")

</div>

I want to avoid any excess allocation. The f1! below needs 2m+1 allocations while the f2! needs m+1 allocations. is ito possible to make this kind of functionality 1 allocation only? function f1!(du, u) m,n = size(…

---

## [Using nonunique() with multiple dataframe columns](https://discourse.julialang.org/t/using-nonunique-with-multiple-dataframe-columns/64523)

<div class="topic-metadata">

**Author:** [@kbot](https://discourse.julialang.org/u/kbot)\
**Replies:** 2\
**Last updated:** [July 13, 2021, 7:54am UTC](https://discourse.julialang.org/t/using-nonunique-with-multiple-dataframe-columns/64523 "2021-07-13T07:54:14Z")

</div>

Hi, I’d like to identify rows with duplicate values across multiple columns (i.e. colA && colC && colD) with something like findall( nonunique( df, CONDITION) ) for one column CONDITION is easy e.g. :colA. How can I…

---

## [Auto-merge in GitHub](https://discourse.julialang.org/t/auto-merge-in-github/64504)

<div class="topic-metadata">

**Author:** [@rikh](https://discourse.julialang.org/u/rikh)\
**Replies:** 1\
**Last updated:** [July 13, 2021, 7:21am UTC](https://discourse.julialang.org/t/auto-merge-in-github/64504 "2021-07-13T07:21:54Z")

</div>

GitHub supports auto-merging of pull requests (PRs) when GitHub Actions succeed. This is a bit of an overlooked feature (I see almost no one using it) and it’s also poorly documented. So, here is a little tutorial. Fo…

---

## [DataFrame column names with symbols](https://discourse.julialang.org/t/dataframe-column-names-with-symbols/62985)

<div class="topic-metadata">

**Author:** [@Ismam](https://discourse.julialang.org/u/Ismam)\
**Replies:** 7\
**Last updated:** [July 13, 2021, 5:47am UTC](https://discourse.julialang.org/t/dataframe-column-names-with-symbols/62985 "2021-07-13T05:47:26Z")

</div>

I’m using DataFramesMeta and would like to calculate a new column called “p\*”. I’ve tried: @transform(df, p\* = … ) @transform(df, “p\*” = … ) No luck. I can make do with: Disc\[!,“p\*”\] .= … But, not ideal. Thanks!

---

## [How to get and pass on json retrieved via HTTP](https://discourse.julialang.org/t/how-to-get-and-pass-on-json-retrieved-via-http/64532)

<div class="topic-metadata">

**Author:** [@Jon\_Norberg](https://discourse.julialang.org/u/Jon_Norberg)\
**Replies:** 4\
**Last updated:** [July 13, 2021, 5:46am UTC](https://discourse.julialang.org/t/how-to-get-and-pass-on-json-retrieved-via-http/64532 "2021-07-13T05:46:55Z")

</div>

Hi, I am getting my feet wet in web-interactivity…so this might be a very basic question. In the following code the retrieved messages are nicely printed out as a string containing the json information, but my JSON3.rea…

---

## [Is it possible to apply some pipeline whether it'd be MLJ, Scikitlearn or FeatureTransform by group?](https://discourse.julialang.org/t/is-it-possible-to-apply-some-pipeline-whether-itd-be-mlj-scikitlearn-or-featuretransform-by-group/64548)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 0\
**Last updated:** [July 13, 2021, 4:23am UTC](https://discourse.julialang.org/t/is-it-possible-to-apply-some-pipeline-whether-itd-be-mlj-scikitlearn-or-featuretransform-by-group/64548 "2021-07-13T04:23:56Z")

</div>

I have asked about this on about scikitlearn. But I can’t find a good solution. E.g. if I want to perform pca or standardscaler, I might want to do it within each group? But there is no easy way to do that in a pipelin…

---

## [Data type for a “stupid” binary search tree](https://discourse.julialang.org/t/data-type-for-a-stupid-binary-search-tree/64474)

<div class="topic-metadata">

**Author:** [@circonflexe](https://discourse.julialang.org/u/circonflexe)\
**Replies:** 4\
**Last updated:** [July 13, 2021, 3:59am UTC](https://discourse.julialang.org/t/data-type-for-a-stupid-binary-search-tree/64474 "2021-07-13T03:59:51Z")

</div>

I need a data type for a collection of objects (stored in a given order) which supports both O(log n) insertion and deletion methods, as well as some way to perform a dichotomic search (where I provide the left-or-right …

---

## [Summing over missing column values in a DataFrame](https://discourse.julialang.org/t/summing-over-missing-column-values-in-a-dataframe/64547)

<div class="topic-metadata">

**Author:** [@Ismam](https://discourse.julialang.org/u/Ismam)\
**Replies:** 2\
**Last updated:** [July 13, 2021, 3:39am UTC](https://discourse.julialang.org/t/summing-over-missing-column-values-in-a-dataframe/64547 "2021-07-13T03:39:03Z")

</div>

Hi, I’m using DataFramesMeta and having trouble with wrangling with missing values. df = DataFrame(x = 1:5, y = \[missing, 4, missing, 2, 1\]) x y Int64 Int64? 1 1 missing 2 2 4 3 3 missing 4 4 2 5 5 1…

---

## [Obtaining the name of a package imported using Pkg.develop?](https://discourse.julialang.org/t/obtaining-the-name-of-a-package-imported-using-pkg-develop/64541)

<div class="topic-metadata">

**Author:** [@harris-chris](https://discourse.julialang.org/u/harris-chris)\
**Replies:** 0\
**Last updated:** [July 12, 2021, 11:41pm UTC](https://discourse.julialang.org/t/obtaining-the-name-of-a-package-imported-using-pkg-develop/64541 "2021-07-12T23:41:33Z")

</div>

Hello all, I have a situation where I’m importing a package programatically by using Pkg.develop(url=url\_string), where url\_string is a user input. I then need to find out what the name of the package is. The best I can…

---

## [Convenient parameter change for remake ODEProblem made with ODESystem](https://discourse.julialang.org/t/convenient-parameter-change-for-remake-odeproblem-made-with-odesystem/64537)

<div class="topic-metadata">

**Author:** [@ograsdijk](https://discourse.julialang.org/u/ograsdijk)\
**Replies:** 2\
**Last updated:** [July 12, 2021, 11:34pm UTC](https://discourse.julialang.org/t/convenient-parameter-change-for-remake-odeproblem-made-with-odesystem/64537 "2021-07-12T23:34:39Z")

</div>

I’m creating an ODESystem using ModelingToolkit.jl and was wondering if for EnsembleProblems there is an easier way to specify the parameters in remake. Example, from the documentation of ModelingToolkit: using Modelin…

---

## [Reshaping a matrix into fixed height](https://discourse.julialang.org/t/reshaping-a-matrix-into-fixed-height/64530)

<div class="topic-metadata">

**Author:** [@user\_231578](https://discourse.julialang.org/u/user_231578)\
**Replies:** 7\
**Last updated:** [July 12, 2021, 10:31pm UTC](https://discourse.julialang.org/t/reshaping-a-matrix-into-fixed-height/64530 "2021-07-12T22:31:26Z")

</div>

Suppose I have the following Matrix A = reshape(\[1:n;\], isqrt(n), isqrt(n)) 4×4 Matrix{Int64}: 1 5 9 13 2 6 10 14 3 7 11 15 4 8 12 16 where I used n=16 d=2 I need to obtain from A the following matri…

---

## [How to save an image to computer](https://discourse.julialang.org/t/how-to-save-an-image-to-computer/64533)

<div class="topic-metadata">

**Author:** [@KyleModell](https://discourse.julialang.org/u/KyleModell)\
**Replies:** 2\
**Last updated:** [July 12, 2021, 10:06pm UTC](https://discourse.julialang.org/t/how-to-save-an-image-to-computer/64533 "2021-07-12T22:06:41Z")

</div>

Hey, I want to save the image below to my computer but don’t know how. Attached is a screenshot of code and image. Any ideas? Thanks! (I\_trimmed is an Array{Float32,2}, the rest are PyObject) Best, K

---

## [Surface plotting using PyPlot](https://discourse.julialang.org/t/surface-plotting-using-pyplot/54417)

<div class="topic-metadata">

**Author:** [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)\
**Replies:** 9\
**Last updated:** [July 12, 2021, 9:56pm UTC](https://discourse.julialang.org/t/surface-plotting-using-pyplot/54417 "2021-07-12T21:56:13Z")

</div>

Hi, I want to use PyPlot (I don’t like Plots) for plotting a surface, but I seem to miss how this is done. I have a 1D-array of x values, a 1D-array of y values, and a 2D array z of f(x,y) values. In this case length(x…

---

## [Fix vs @constraint in JuMP](https://discourse.julialang.org/t/fix-vs-constraint-in-jump/64509)

<div class="topic-metadata">

**Author:** [@Shuvomoy\_Das\_Gupta](https://discourse.julialang.org/u/Shuvomoy_Das_Gupta)\
**Replies:** 2\
**Last updated:** [July 12, 2021, 9:02pm UTC](https://discourse.julialang.org/t/fix-vs-constraint-in-jump/64509 "2021-07-12T21:02:35Z")

</div>

Dear All, I am trying to solve a mixed-integer optimization problem in JuMP and Gurobi. I have a variable x\_{i,j} over i,j \\in \\{1,2,\\ldots,n\\}, where n is a fairly large number. However, for this particular problem, ov…

---

## [Julia plots: How to fill graph background with different colors](https://discourse.julialang.org/t/julia-plots-how-to-fill-graph-background-with-different-colors/17040)

<div class="topic-metadata">

**Author:** [@pythonuser](https://discourse.julialang.org/u/pythonuser)\
**Replies:** 7\
**Last updated:** [July 11, 2021, 9:11pm UTC](https://discourse.julialang.org/t/julia-plots-how-to-fill-graph-background-with-different-colors/17040 "2021-07-11T21:11:53Z")

</div>

I am trying make a plot with the background colors different for each section of the y-axis. For example: using Plots gr() plot(Plots.fakedata(50, 1), w=3, fill = (0, 0.2, :red)) generates the image: I want to fill…

---

## [Multiple condition findall in dataframes](https://discourse.julialang.org/t/multiple-condition-findall-in-dataframes/64521)

<div class="topic-metadata">

**Author:** [@mjanun](https://discourse.julialang.org/u/mjanun)\
**Replies:** 5\
**Last updated:** [July 12, 2021, 7:39pm UTC](https://discourse.julialang.org/t/multiple-condition-findall-in-dataframes/64521 "2021-07-12T19:39:24Z")

</div>

I am trying to use findall to find index of items in a dataframe based on multiple conditions. In the example below, I want to find indices when value in FIELD1 = A and values in FIELD3 = 0 df = DataFrame(ID = collect(1…

---

## [|\>=, piping update operator](https://discourse.julialang.org/t/piping-update-operator/64511)

<div class="topic-metadata">

**Author:** [@fgerick](https://discourse.julialang.org/u/fgerick)\
**Replies:** 16\
**Last updated:** [July 12, 2021, 7:23pm UTC](https://discourse.julialang.org/t/piping-update-operator/64511 "2021-07-12T19:23:35Z")

</div>

Using SymPy.jl for a little bit I ended up wanting to do something like this using SymPy @syms x y x = cos(y)^2 + sin(y)^2 x |\>= simplify i.e. using a piped updating operator. Could this be possible, and if not, why?

---

## [RemoteChannel and usage of put! and take! on the same process](https://discourse.julialang.org/t/remotechannel-and-usage-of-put-and-take-on-the-same-process/64525)

<div class="topic-metadata">

**Author:** [@deveshjawla](https://discourse.julialang.org/u/deveshjawla)\
**Replies:** 0\
**Last updated:** [July 12, 2021, 6:39pm UTC](https://discourse.julialang.org/t/remotechannel-and-usage-of-put-and-take-on-the-same-process/64525 "2021-07-12T18:39:25Z")

</div>

using Distributed addprocs(2, exeflags="--project") @everywhere begin function update\_remote\_counter(remote\_counter::RemoteChannel, update\_count::Int) old\_value=take!(remote\_counter) put!(remote\_counter, old\_value +…

---

## [Eachrow() error?](https://discourse.julialang.org/t/eachrow-error/64516)

<div class="topic-metadata">

**Author:** [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Replies:** 9\
**Last updated:** [July 12, 2021, 5:27pm UTC](https://discourse.julialang.org/t/eachrow-error/64516 "2021-07-12T17:27:12Z")

</div>

julia\> Random.seed!(1); julia\> x = randn(3, 5); julia\> x 3×5 Matrix{Float64}: 0.297288 -0.0104452 2.29509 -2.26709 0.583708 0.382396 -0.839027 0.408396 0.529966 0.963272 -0.597634 0.311111 0.22901 …

---

## [REPL debug with variable change breakpoint](https://discourse.julialang.org/t/repl-debug-with-variable-change-breakpoint/64520)

<div class="topic-metadata">

**Author:** [@filchristou](https://discourse.julialang.org/u/filchristou)\
**Replies:** 0\
**Last updated:** [July 12, 2021, 5:17pm UTC](https://discourse.julialang.org/t/repl-debug-with-variable-change-breakpoint/64520 "2021-07-12T17:17:40Z")

</div>

Some Java IDEs (e.g. Eclipse) give the possibility to have breakpoints when a watched variable changes value. I was wondering if this is also possible for Julia. Currently I am mostly using REPL and the Debugger.jl but m…

---

## [New Documenter failure on deployed docs](https://discourse.julialang.org/t/new-documenter-failure-on-deployed-docs/64437)

<div class="topic-metadata">

**Author:** [@PeterSimon](https://discourse.julialang.org/u/PeterSimon)\
**Replies:** 1\
**Last updated:** [July 12, 2021, 4:23pm UTC](https://discourse.julialang.org/t/new-documenter-failure-on-deployed-docs/64437 "2021-07-12T16:23:44Z")

</div>

After pushing a small change and tagging a new version of PSSFSS, Documenter is failing to run properly on the deployed documentation, though it works flawlessly on my local machine. When I look at the log file at https…

---

## [Export/interface Julia code to FMI/FMU standard .fmu](https://discourse.julialang.org/t/export-interface-julia-code-to-fmi-fmu-standard-fmu/21211)

<div class="topic-metadata">

**Author:** [@bienpierre](https://discourse.julialang.org/u/bienpierre)\
**Replies:** 10\
**Last updated:** [July 12, 2021, 4:12pm UTC](https://discourse.julialang.org/t/export-interface-julia-code-to-fmi-fmu-standard-fmu/21211 "2021-07-12T16:12:02Z")

</div>

Hi everyone, I will start to build a modeling framework. I have simulation models which are built with Modelica, some others with Simulink/Simscape Toolbox and finally I have a control system designs with Julia and pa…

---

## [Documentation of JuliaFMI](https://discourse.julialang.org/t/documentation-of-juliafmi/41971)

<div class="topic-metadata">

**Author:** [@Ashwin\_Sundarka](https://discourse.julialang.org/u/Ashwin_Sundarka)\
**Replies:** 3\
**Last updated:** [July 12, 2021, 3:54pm UTC](https://discourse.julialang.org/t/documentation-of-juliafmi/41971 "2021-07-12T15:54:50Z")

</div>

Hello People! I am trying to simulate a FMU model in Julia, for the same I installed the package JuliaFMI. But I am not able to find any documentation of this package. In the readMe file of the package it is mentioned …

---

## [Optional argument is a struct](https://discourse.julialang.org/t/optional-argument-is-a-struct/64502)

<div class="topic-metadata">

**Author:** [@Ribeiro](https://discourse.julialang.org/u/Ribeiro)\
**Replies:** 6\
**Last updated:** [July 12, 2021, 3:33pm UTC](https://discourse.julialang.org/t/optional-argument-is-a-struct/64502 "2021-07-12T15:33:19Z")

</div>

Hello, I have a function that takes say 3 arguments fun(a,b,c), where they are all structs I defined and the third one is optional. If the third one is present, then I’ll need to call fun2. What’s a clean way to do th…

---

## [Using a AbstractUnitRange inside a struct](https://discourse.julialang.org/t/using-a-abstractunitrange-inside-a-struct/64463)

<div class="topic-metadata">

**Author:** [@Josa9321](https://discourse.julialang.org/u/Josa9321)\
**Replies:** 10\
**Last updated:** [July 12, 2021, 3:24pm UTC](https://discourse.julialang.org/t/using-a-abstractunitrange-inside-a-struct/64463 "2021-07-12T15:24:41Z")

</div>

I want to use this struct: struct Instance\_RH{P \<: AbstractFloat, Q \<: AbstractUnitRange} cost::Array{P, 2} time\_by\_quantity::Array{P, 2} penalty\_by\_multitask::Array{P, 1} maximum\_budget::P I::Q …

---

## [Packageswith function/](https://discourse.julialang.org/t/packageswith-function/64485)

<div class="topic-metadata">

**Author:** [@RaulDurand](https://discourse.julialang.org/u/RaulDurand)\
**Replies:** 2\
**Last updated:** [July 12, 2021, 2:22pm UTC](https://discourse.julialang.org/t/packageswith-function/64485 "2021-07-12T14:22:57Z")

</div>

Is there a way to know which registered packages depend on a specific one? e.g. \] packageswith Luxor So I can see if some additional functionality is implemented in another package that uses Luxor.

---

## [Understanding the behavior of the geometric mean for multidimensional arrays](https://discourse.julialang.org/t/understanding-the-behavior-of-the-geometric-mean-for-multidimensional-arrays/64507)

<div class="topic-metadata">

**Author:** [@josimar](https://discourse.julialang.org/u/josimar)\
**Replies:** 1\
**Last updated:** [July 12, 2021, 2:15pm UTC](https://discourse.julialang.org/t/understanding-the-behavior-of-the-geometric-mean-for-multidimensional-arrays/64507 "2021-07-12T14:15:27Z")

</div>

I would like to understand how I can take the geometric mean of an array across a certain dimension. For the mean value, I normally use: mean(x, dims=1) But the same does not work for geometric mean, why? using Stat…

---

## [VSCode - Displaying custom structs](https://discourse.julialang.org/t/vscode-displaying-custom-structs/64500)

<div class="topic-metadata">

**Author:** [@mrVeng](https://discourse.julialang.org/u/mrVeng)\
**Replies:** 1\
**Last updated:** [July 12, 2021, 2:07pm UTC](https://discourse.julialang.org/t/vscode-displaying-custom-structs/64500 "2021-07-12T14:07:36Z")

</div>

Hi there! I normally use Atom, but come back to VSCode from time to time to check out the progress of the VSCode team - Thank you for your time and work! I was wondering if there is a method to display a custom struct …

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

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