# Specific Domains

**URL:** https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=306

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

**Page:** 307

---

## [Collect trace indices meeting condition](https://discourse.julialang.org/t/collect-trace-indices-meeting-condition/75531)

<div class="topic-metadata">

**Author:** [@Mo-Gul](https://discourse.julialang.org/u/Mo-Gul)\
**Replies:** 2\
**Last updated:** [February 2, 2022, 4:42am UTC](https://discourse.julialang.org/t/collect-trace-indices-meeting-condition/75531 "2022-02-02T04:42:06Z")

</div>

Continuing the discussion from Change each trace meeting condition in PlotyJS plot: Now I understand that the second argument in restyle! can’t just be a single index, but also a vector of indices. So my question this t…

---

## [Improve performance of a code with very large % of Garbage Collection](https://discourse.julialang.org/t/improve-performance-of-a-code-with-very-large-of-garbage-collection/75548)

<div class="topic-metadata">

**Author:** [@jmcastro2109](https://discourse.julialang.org/u/jmcastro2109)\
**Replies:** 19\
**Last updated:** [February 1, 2022, 10:31pm UTC](https://discourse.julialang.org/t/improve-performance-of-a-code-with-very-large-of-garbage-collection/75548 "2022-02-01T22:31:13Z")

</div>

Hello, I am trying to squeeze performance of the following code as much as possible. When I benchmark it, I get a very large number for the garbage collection statistic (see below). Does anyone have any recommendation fo…

---

## [Starter example in JuMP](https://discourse.julialang.org/t/starter-example-in-jump/75570)

<div class="topic-metadata">

**Author:** [@tonyhur](https://discourse.julialang.org/u/tonyhur)\
**Replies:** 4\
**Last updated:** [February 1, 2022, 7:24pm UTC](https://discourse.julialang.org/t/starter-example-in-jump/75570 "2022-02-01T19:24:57Z")

</div>

I tested JuMP some times ago an everything went perfect. Now when I retry the small model at: https://jump.dev/JuMP.jl/stable/tutorials/getting\_started/getting\_started\_with\_JuMP/ I get an error model = Model(GLPK.Opti…

---

## [Function for creating a neural network with n hidden layers in Flux](https://discourse.julialang.org/t/function-for-creating-a-neural-network-with-n-hidden-layers-in-flux/75589)

<div class="topic-metadata">

**Author:** [@Handam](https://discourse.julialang.org/u/Handam)\
**Replies:** 1\
**Last updated:** [February 1, 2022, 6:08pm UTC](https://discourse.julialang.org/t/function-for-creating-a-neural-network-with-n-hidden-layers-in-flux/75589 "2022-02-01T18:08:18Z")

</div>

Hi, I want to create a function, where I can set the number of hidden layers with an argument. One option that kinda works is using Flux function make\_nn(length\_in = 80, length\_out = 1, nodes = 128, hid\_lay = 3, act\_fu…

---

## [Plot does not update with a string vector as an observable in Makie](https://discourse.julialang.org/t/plot-does-not-update-with-a-string-vector-as-an-observable-in-makie/75503)

<div class="topic-metadata">

**Author:** [@fnoessler](https://discourse.julialang.org/u/fnoessler)\
**Replies:** 0\
**Last updated:** [January 31, 2022, 12:57pm UTC](https://discourse.julialang.org/t/plot-does-not-update-with-a-string-vector-as-an-observable-in-makie/75503 "2022-01-31T12:57:27Z")

</div>

Hello, I tried to use a vector of strings as an Observable and the text! command to interactively update a plot in Makie. Here is an example: using GLMakie string\_vec = Observable(\["a", "b"\]) string\_test = Observable(…

---

## [ModelingToolkit Nonlinear Optimal Control](https://discourse.julialang.org/t/modelingtoolkit-nonlinear-optimal-control/75561)

<div class="topic-metadata">

**Author:** [@SCher](https://discourse.julialang.org/u/SCher)\
**Replies:** 4\
**Last updated:** [February 1, 2022, 7:15am UTC](https://discourse.julialang.org/t/modelingtoolkit-nonlinear-optimal-control/75561 "2022-02-01T07:15:19Z")

</div>

I ran the example nonlinear optimal control problem in the documentation, reproduced below: using ModelingToolkit @variables t x(t) v(t) u(t) @parameters p\[1:2\] D = Differential(t) loss = (4-x)^2 + 2v^2 + u^2 eqs = \[…

---

## [Passing gradient back from remote server](https://discourse.julialang.org/t/passing-gradient-back-from-remote-server/41150)

<div class="topic-metadata">

**Author:** [@Jimmie\_Butler](https://discourse.julialang.org/u/Jimmie_Butler)\
**Replies:** 0\
**Last updated:** [June 10, 2020, 5:27pm UTC](https://discourse.julialang.org/t/passing-gradient-back-from-remote-server/41150 "2020-06-10T17:27:14Z")

</div>

I’m trying to pass a gradient through a remote call with Zygote. The server seems to be passing the gradient back properly, the server decodes and returns it from the adjoint, but the final gradient being returned is c…

---

## [How to debug "Initial guess is not an interior point" in Optim.jl?](https://discourse.julialang.org/t/how-to-debug-initial-guess-is-not-an-interior-point-in-optim-jl/75554)

<div class="topic-metadata">

**Author:** [@ForceBru](https://discourse.julialang.org/u/ForceBru)\
**Replies:** 3\
**Last updated:** [January 31, 2022, 11:41pm UTC](https://discourse.julialang.org/t/how-to-debug-initial-guess-is-not-an-interior-point-in-optim-jl/75554 "2022-01-31T23:41:11Z")

</div>

I’m trying to do constrained optimization using IPointNewton in Optim.jl, but running optimize(objective, dfc, θ0, IPNewton(), autodiff=:forward) produces: Initial guess is not an interior point …and then the results…

---

## [Problem with running Ipopt with Pardiso on jupyter notebook](https://discourse.julialang.org/t/problem-with-running-ipopt-with-pardiso-on-jupyter-notebook/75424)

<div class="topic-metadata">

**Author:** [@Shuvomoy\_Das\_Gupta](https://discourse.julialang.org/u/Shuvomoy_Das_Gupta)\
**Replies:** 4\
**Last updated:** [January 31, 2022, 10:54pm UTC](https://discourse.julialang.org/t/problem-with-running-ipopt-with-pardiso-on-jupyter-notebook/75424 "2022-01-31T22:54:25Z")

</div>

Dear all, I am trying to solve an optimization problem from jupyter notebook using JuMP with solver Ipopt (Pardiso linear solver). I can solve the problem without any problem when the code is in a filename.jl file and I…

---

## [FFT'ing lots of short vectors on GPU](https://discourse.julialang.org/t/ffting-lots-of-short-vectors-on-gpu/75529)

<div class="topic-metadata">

**Author:** [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Replies:** 3\
**Last updated:** [January 31, 2022, 9:28pm UTC](https://discourse.julialang.org/t/ffting-lots-of-short-vectors-on-gpu/75529 "2022-01-31T21:28:22Z")

</div>

I am wondering if there is a way to Fourier-transform lots of short vectors on GPU. I have more than 10,000 vectors. The lengths of all vectors are the same and around 2^12. Each vector is not long enough to get a sig…

---

## [Why does \`relayout!(p, template=...)\` get overwritten by next \`relayout!\`?](https://discourse.julialang.org/t/why-does-relayout-p-template-get-overwritten-by-next-relayout/75536)

<div class="topic-metadata">

**Author:** [@Mo-Gul](https://discourse.julialang.org/u/Mo-Gul)\
**Replies:** 0\
**Last updated:** [January 31, 2022, 8:30pm UTC](https://discourse.julialang.org/t/why-does-relayout-p-template-get-overwritten-by-next-relayout/75536 "2022-01-31T20:30:18Z")

</div>

For the code p = make\_subplots( rows=2, cols=1, shared\_xaxes=true, ) add\_trace!(p, scatter(y=1:2), row=1, col=1) add\_trace!(p, scatter(y=1:2), row=2, col=1) relayout!( p, template="plotly\_white", )…

---

## [Implementing model where data is a function of random variables](https://discourse.julialang.org/t/implementing-model-where-data-is-a-function-of-random-variables/75354)

<div class="topic-metadata">

**Author:** [@Pablo\_Marchant](https://discourse.julialang.org/u/Pablo_Marchant)\
**Replies:** 5\
**Last updated:** [January 31, 2022, 8:00pm UTC](https://discourse.julialang.org/t/implementing-model-where-data-is-a-function-of-random-variables/75354 "2022-01-31T20:00:22Z")

</div>

Hi, I’ve got a question regarding implementation of a model where an observed variable can be described as a function of other random variables. My issues here are perhaps just due to my inexperience in using probabilis…

---

## [Change each trace meeting condition in PlotyJS plot](https://discourse.julialang.org/t/change-each-trace-meeting-condition-in-plotyjs-plot/75474)

<div class="topic-metadata">

**Author:** [@Mo-Gul](https://discourse.julialang.org/u/Mo-Gul)\
**Replies:** 5\
**Last updated:** [January 31, 2022, 7:05pm UTC](https://discourse.julialang.org/t/change-each-trace-meeting-condition-in-plotyjs-plot/75474 "2022-01-31T19:05:21Z")

</div>

The title states it all. Here an example with the Julia code without the requested part. using DataFrames using PlotlyJS df = DataFrame( x = 1:5, a = rand(5), b\_calc = rand(5), c = rand(5), d\_calc =…

---

## [Hessian Vector Products on GPU using ForwardDiff, Zygote, and Flux](https://discourse.julialang.org/t/hessian-vector-products-on-gpu-using-forwarddiff-zygote-and-flux/75306)

<div class="topic-metadata">

**Author:** [@RS-Coop](https://discourse.julialang.org/u/RS-Coop)\
**Replies:** 13\
**Last updated:** [January 31, 2022, 2:28pm UTC](https://discourse.julialang.org/t/hessian-vector-products-on-gpu-using-forwarddiff-zygote-and-flux/75306 "2022-01-31T14:28:10Z")

</div>

Hello, I am trying to compute the Hessian vector product of a Flux model (with some vector) on the GPU. This is giving me some errors, which I think are realted specifically to ForwardDiff. Any help would be greatly app…

---

## [Optimizing performance of 2D nonlinear diffusion UDE](https://discourse.julialang.org/t/optimizing-performance-of-2d-nonlinear-diffusion-ude/72113)

<div class="topic-metadata">

**Author:** [@JordiBolibar](https://discourse.julialang.org/u/JordiBolibar)\
**Replies:** 54\
**Last updated:** [January 31, 2022, 11:47am UTC](https://discourse.julialang.org/t/optimizing-performance-of-2d-nonlinear-diffusion-ude/72113 "2022-01-31T11:47:17Z")

</div>

I have a UDE based on a 2D nonlinear ice flow diffusion PDE. It works correctly both for the forward and backwards pass, but despite using a semi-implicit solver the memory usage for backpropagation is just too big for e…

---

## [Best way to improve local minimas in nonlinear optimization?](https://discourse.julialang.org/t/best-way-to-improve-local-minimas-in-nonlinear-optimization/75215)

<div class="topic-metadata">

**Author:** [@Kevin\_Shen1](https://discourse.julialang.org/u/Kevin_Shen1)\
**Replies:** 29\
**Last updated:** [January 31, 2022, 10:23am UTC](https://discourse.julialang.org/t/best-way-to-improve-local-minimas-in-nonlinear-optimization/75215 "2022-01-31T10:23:03Z")

</div>

I’m trying to reduce the number of times NLP is returning a local minima instead of global minima (I know theoretically this is impossible if the objective is difficult enough). Currently I’m just doing a for-loop where …

---

## [Add package on remote worker](https://discourse.julialang.org/t/add-package-on-remote-worker/75489)

<div class="topic-metadata">

**Author:** [@guyvdb](https://discourse.julialang.org/u/guyvdb)\
**Replies:** 1\
**Last updated:** [January 31, 2022, 6:50am UTC](https://discourse.julialang.org/t/add-package-on-remote-worker/75489 "2022-01-31T06:50:27Z")

</div>

I am trying to install packages on a Distributed worker, but get errors during precompilation that don’t occur when running the same commands on the server manually. using Distributed pids = addprocs(\["server.edu"\]) rem…

---

## [GLMakie.jl - Font/graphics displaying incorrectly on M1 (ubuntu parallels) in GL window](https://discourse.julialang.org/t/glmakie-jl-font-graphics-displaying-incorrectly-on-m1-ubuntu-parallels-in-gl-window/75481)

<div class="topic-metadata">

**Author:** [@kathesch](https://discourse.julialang.org/u/kathesch)\
**Replies:** 3\
**Last updated:** [January 31, 2022, 5:55am UTC](https://discourse.julialang.org/t/glmakie-jl-font-graphics-displaying-incorrectly-on-m1-ubuntu-parallels-in-gl-window/75481 "2022-01-31T05:55:16Z")

</div>

Hi all, I was curious if anyone has had this graphical issue before or perhaps has any other insight as to what could be wrong. The GL window should be displaying crisper fonts/lines. It displays correctly in CairoMakie…

---

## [Which is best package for integration(and differentiation)?](https://discourse.julialang.org/t/which-is-best-package-for-integration-and-differentiation/75461)

<div class="topic-metadata">

**Author:** [@matic\_lauko](https://discourse.julialang.org/u/matic_lauko)\
**Replies:** 6\
**Last updated:** [January 30, 2022, 11:44pm UTC](https://discourse.julialang.org/t/which-is-best-package-for-integration-and-differentiation/75461 "2022-01-30T23:44:46Z")

</div>

I’m new in Julia and have no idea of which are good packages for integration. I have checked juliapackages and observer, but everything is explained on a math level far above mine. Thank you for your advice.

---

## [Performance of Computation of Expectation of slow function](https://discourse.julialang.org/t/performance-of-computation-of-expectation-of-slow-function/74961)

<div class="topic-metadata">

**Author:** [@jmcastro2109](https://discourse.julialang.org/u/jmcastro2109)\
**Replies:** 13\
**Last updated:** [January 30, 2022, 4:48pm UTC](https://discourse.julialang.org/t/performance-of-computation-of-expectation-of-slow-function/74961 "2022-01-30T16:48:35Z")

</div>

Hi! I am trying to optimize this section of code. Basically, there are two functions. The first one solves a linear programming problem over a convex set. The second function computes a Monte Carlo experiment over S tria…

---

## [Finding the right JuMP package to solve a mixed-integer convex program](https://discourse.julialang.org/t/finding-the-right-jump-package-to-solve-a-mixed-integer-convex-program/75350)

<div class="topic-metadata">

**Author:** [@merlion](https://discourse.julialang.org/u/merlion)\
**Replies:** 3\
**Last updated:** [January 30, 2022, 3:29pm UTC](https://discourse.julialang.org/t/finding-the-right-jump-package-to-solve-a-mixed-integer-convex-program/75350 "2022-01-30T15:29:51Z")

</div>

I have a fairly straightforward optimisation problem that looks like this: \\max \\ \\log(a \\cdot x) + b \\cdot x \\\\ s.t. \\ x \\in \\{0,1\\}^n \\text{ and } \\sum\_{i \\in \[n\]}x\_i \\leq 10, for some a, b \\in \\mathbb{R}^n. I’d li…

---

## [Color the lines in a contour plot of \`z\` by the values a different matrix \`w\`](https://discourse.julialang.org/t/color-the-lines-in-a-contour-plot-of-z-by-the-values-a-different-matrix-w/51233)

<div class="topic-metadata">

**Author:** [@ash](https://discourse.julialang.org/u/ash)\
**Replies:** 1\
**Last updated:** [January 30, 2022, 11:43am UTC](https://discourse.julialang.org/t/color-the-lines-in-a-contour-plot-of-z-by-the-values-a-different-matrix-w/51233 "2022-01-30T11:43:51Z")

</div>

Let’s say I have the following MWE using Plots x = y = range(0, stop=π, length=100) z = cos.(x) .+ sin.(y') w = cos.(x).^2 .- sin.(y').^2 contour(x,y,z, levels=1) I would like the lines from the contour plot of z to…

---

## [Overlaying contour plots - colours](https://discourse.julialang.org/t/overlaying-contour-plots-colours/37795)

<div class="topic-metadata">

**Author:** [@chriswaudby](https://discourse.julialang.org/u/chriswaudby)\
**Replies:** 3\
**Last updated:** [January 30, 2022, 12:53am UTC](https://discourse.julialang.org/t/overlaying-contour-plots-colours/37795 "2022-01-30T00:53:50Z")

</div>

I’m working with spectroscopic data where data are visualised as 2D contour plots (just lines, not filled), and it is extremely common to overlay multiple datasets using different colours (e.g. search ‘2D NMR titration’ …

---

## [Unkown connection number for ModelingToolkit system](https://discourse.julialang.org/t/unkown-connection-number-for-modelingtoolkit-system/75337)

<div class="topic-metadata">

**Author:** [@Antomek](https://discourse.julialang.org/u/Antomek)\
**Replies:** 6\
**Last updated:** [January 29, 2022, 7:36pm UTC](https://discourse.julialang.org/t/unkown-connection-number-for-modelingtoolkit-system/75337 "2022-01-29T19:36:04Z")

</div>

Hello everyone, I’ve run into a challenge with using ModelingToolkit, where I have a lots of (similar) systems, each with lots of inputs from a number of other systems connected to it. Because of the large number of sy…

---

## [Mathematical calculations accelerated by GPU](https://discourse.julialang.org/t/mathematical-calculations-accelerated-by-gpu/74607)

<div class="topic-metadata">

**Author:** [@Minumsand](https://discourse.julialang.org/u/Minumsand)\
**Replies:** 9\
**Last updated:** [January 29, 2022, 4:28pm UTC](https://discourse.julialang.org/t/mathematical-calculations-accelerated-by-gpu/74607 "2022-01-29T16:28:47Z")

</div>

Hello dear GPU-interested Julia members Although I am still far away from being familiar enough with Julia, I am making plans to utilise a GPU for future number crunching. I want to underline: mining with graphic cards …

---

## [How to convert a String to a Reaction/ReactionSystem type (Catalyst.jl)?](https://discourse.julialang.org/t/how-to-convert-a-string-to-a-reaction-reactionsystem-type-catalyst-jl/75377)

<div class="topic-metadata">

**Author:** [@Leticia-maria](https://discourse.julialang.org/u/Leticia-maria)\
**Replies:** 1\
**Last updated:** [January 29, 2022, 2:58pm UTC](https://discourse.julialang.org/t/how-to-convert-a-string-to-a-reaction-reactionsystem-type-catalyst-jl/75377 "2022-01-29T14:58:18Z")

</div>

Hey you all, I wanna use Strings to add reactions to a @reaction\_network in Catalyst.jl. For example: julia\> example = @reaction\_network empty julia\> addreaction!(example, "k, A --\> B") or julia\> addreaction!(example,…

---

## [DataFrames version of R's which() function](https://discourse.julialang.org/t/dataframes-version-of-rs-which-function/75401)

<div class="topic-metadata">

**Author:** [@rwalters31](https://discourse.julialang.org/u/rwalters31)\
**Replies:** 6\
**Last updated:** [January 29, 2022, 1:59pm UTC](https://discourse.julialang.org/t/dataframes-version-of-rs-which-function/75401 "2022-01-29T13:59:17Z")

</div>

TLDR; is there a Julia version of R’s which() function? I’m rewriting some code from R to Julia. I’ve gotten comfortable with the DataFrames subset function but in addition to returning rows I occassionally need to acc…

---

## [GRUtils: error bars always behind fill in bar plot](https://discourse.julialang.org/t/grutils-error-bars-always-behind-fill-in-bar-plot/75388)

<div class="topic-metadata">

**Author:** [@mkschleg](https://discourse.julialang.org/u/mkschleg)\
**Replies:** 2\
**Last updated:** [January 29, 2022, 12:48am UTC](https://discourse.julialang.org/t/grutils-error-bars-always-behind-fill-in-bar-plot/75388 "2022-01-29T00:48:51Z")

</div>

I’m trying to combine the errorbar and barplot plots using hold. No matter what order I do this in the error bars always appear under the bar plot fill. Is there any fix for this? MWE: using GRUtils let y = rand(10) …

---

## [Makie - SVG saved with CairoMakie not editable (looks like raster)](https://discourse.julialang.org/t/makie-svg-saved-with-cairomakie-not-editable-looks-like-raster/75335)

<div class="topic-metadata">

**Author:** [@VMHidalgo](https://discourse.julialang.org/u/VMHidalgo)\
**Replies:** 13\
**Last updated:** [January 28, 2022, 9:59pm UTC](https://discourse.julialang.org/t/makie-svg-saved-with-cairomakie-not-editable-looks-like-raster/75335 "2022-01-28T21:59:10Z")

</div>

Hi guys, I am using CairoMakie on Ubuntu and saving plots as SVG. When I open the SVG file with Inkscape to edit it, the file cannot be edited. It looks like a raster image. What is happening? At first glance, this ma…

---

## [Which Graphing tool allows to create interactable Graphs](https://discourse.julialang.org/t/which-graphing-tool-allows-to-create-interactable-graphs/75389)

<div class="topic-metadata">

**Author:** [@matic\_lauko](https://discourse.julialang.org/u/matic_lauko)\
**Replies:** 0\
**Last updated:** [January 28, 2022, 8:32pm UTC](https://discourse.julialang.org/t/which-graphing-tool-allows-to-create-interactable-graphs/75389 "2022-01-28T20:32:37Z")

</div>

I’m trying to create a game, in which you have to draw vertices and edges, with length. Then you have to be able to move on those edges from one node to another. Is there a package in Julia that would allow that? If not…

[Previous page](https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=305)

[Next page](https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=307)
