# Specific Domains

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

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

**Page:** 287

---

## [ModelingToolkit example macro appears not to work](https://discourse.julialang.org/t/modelingtoolkit-example-macro-appears-not-to-work/79981)

<div class="topic-metadata">

**Author:** [@Kieran\_Marray](https://discourse.julialang.org/u/Kieran_Marray)\
**Replies:** 2\
**Last updated:** [April 25, 2022, 1:38pm UTC](https://discourse.julialang.org/t/modelingtoolkit-example-macro-appears-not-to-work/79981 "2022-04-25T13:38:17Z")

</div>

Hi! I am trying to set up an ODE System similar to the very first example in ModelingToolkit. When I try to run e.g the code from the first example I get the error \`UndefVarError: @named not defined’. Anyone know what …

---

## [Using CPLEX populate method with JuMP](https://discourse.julialang.org/t/using-cplex-populate-method-with-jump/79973)

<div class="topic-metadata">

**Author:** [@MLainee](https://discourse.julialang.org/u/MLainee)\
**Replies:** 2\
**Last updated:** [April 25, 2022, 11:12am UTC](https://discourse.julialang.org/t/using-cplex-populate-method-with-jump/79973 "2022-04-25T11:12:22Z")

</div>

Greetings, I am currently using the CPLEX optimizer with the help of the JuMP package. In order to generate constraints for my model, I am currently using a function of the following type: using JuMP using CPLEX funct…

---

## [How to find a root at the diverging boundary?](https://discourse.julialang.org/t/how-to-find-a-root-at-the-diverging-boundary/79930)

<div class="topic-metadata">

**Author:** [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)\
**Replies:** 7\
**Last updated:** [April 25, 2022, 9:55am UTC](https://discourse.julialang.org/t/how-to-find-a-root-at-the-diverging-boundary/79930 "2022-04-25T09:55:56Z")

</div>

Say if I have a function f(x; \\lambda) which is continuous and smooth where x \\in (0, \\infty) for any 0\<\\lambda \< \\lambda^\*. For each \\lambda, there is a single minimum at the same location x^\*, f(x^\*; \\lambda). f(x^\*; \\…

---

## [Writing loops in optimization problems in Julia](https://discourse.julialang.org/t/writing-loops-in-optimization-problems-in-julia/79927)

<div class="topic-metadata">

**Author:** [@Eric.O](https://discourse.julialang.org/u/Eric.O)\
**Replies:** 7\
**Last updated:** [April 24, 2022, 11:44pm UTC](https://discourse.julialang.org/t/writing-loops-in-optimization-problems-in-julia/79927 "2022-04-24T23:44:55Z")

</div>

I am trying to use Mosek to solve this optimization problem. I have my code which displays the optimal solution of the values of x,y,z and the radius R. I want to insert a loop in my code to test if the absolute of the …

---

## [3D Scatter with 2D Projections](https://discourse.julialang.org/t/3d-scatter-with-2d-projections/79920)

<div class="topic-metadata">

**Author:** [@MisterBiggs](https://discourse.julialang.org/u/MisterBiggs)\
**Replies:** 1\
**Last updated:** [April 24, 2022, 11:27pm UTC](https://discourse.julialang.org/t/3d-scatter-with-2d-projections/79920 "2022-04-24T23:27:04Z")

</div>

Saw an interesting post on twitter https://twitter.com/BrainInTheMind/status/1517543839833243649 that got me wondering if there was a supported way to project 3D data onto the axes using Plots or Makie. I came up with my…

---

## [How to properly specify Jacobian & Hessian functions of inequality constraints (Optim)](https://discourse.julialang.org/t/how-to-properly-specify-jacobian-hessian-functions-of-inequality-constraints-optim/53870)

<div class="topic-metadata">

**Author:** [@Michael\_Barmann](https://discourse.julialang.org/u/Michael_Barmann)\
**Replies:** 9\
**Last updated:** [April 24, 2022, 10:34pm UTC](https://discourse.julialang.org/t/how-to-properly-specify-jacobian-hessian-functions-of-inequality-constraints-optim/53870 "2022-04-24T22:34:46Z")

</div>

I’m trying to optimize an objective function with 19 variables in Optim with the following inequality constraints: 0 \<= x\[1\]/3 - x\[2\] \<= 1/3 5 \<= 1/x\[3\] + 1/x\[4\] \<= 6 I’m trying to use either IPNewton() or NewtonTrust…

---

## [Problem in installing Gurobi.jl (ipopt shows infeasible )](https://discourse.julialang.org/t/problem-in-installing-gurobi-jl-ipopt-shows-infeasible/79845)

<div class="topic-metadata">

**Author:** [@HosseinF](https://discourse.julialang.org/u/HosseinF)\
**Replies:** 6\
**Last updated:** [April 24, 2022, 10:23pm UTC](https://discourse.julialang.org/t/problem-in-installing-gurobi-jl-ipopt-shows-infeasible/79845 "2022-04-24T22:23:16Z")

</div>

Hi, I wanted to solve a two stage stochastic problem via ipopt solver but it does not solved and shows: Converged to a point of local infeasibility. Problem may be infeasible. LOCALLY INFEASIBLE┌ Warning: Stochastic p…

---

## [How to show Matrix{RGB} on Cairo surface?](https://discourse.julialang.org/t/how-to-show-matrix-rgb-on-cairo-surface/79166)

<div class="topic-metadata">

**Author:** [@Rratic](https://discourse.julialang.org/u/Rratic)\
**Replies:** 3\
**Last updated:** [April 24, 2022, 5:03pm UTC](https://discourse.julialang.org/t/how-to-show-matrix-rgb-on-cairo-surface/79166 "2022-04-24T17:03:30Z")

</div>

Cairo provides read\_from\_png, but returns value of a special type CairoSurfaceBase, which is hard to operate, so I choose Matrix{RGB}(the thing ImageIO returns). Cairo does provide something called set\_matrix, but the s…

---

## [RNN model converges at a high training loss](https://discourse.julialang.org/t/rnn-model-converges-at-a-high-training-loss/79941)

<div class="topic-metadata">

**Author:** [@cc672012](https://discourse.julialang.org/u/cc672012)\
**Replies:** 0\
**Last updated:** [April 24, 2022, 2:00pm UTC](https://discourse.julialang.org/t/rnn-model-converges-at-a-high-training-loss/79941 "2022-04-24T14:00:36Z")

</div>

Hi, I’m following d2l.ai’s book to learn deep learning. I implemented a character-level RNN from scratch and also one that uses the stuff exported by Flux. Both seem to give the same loss and perplexity where the former…

---

## [Best current approach for working with sparse tensors?](https://discourse.julialang.org/t/best-current-approach-for-working-with-sparse-tensors/79937)

<div class="topic-metadata">

**Author:** [@xor0110](https://discourse.julialang.org/u/xor0110)\
**Replies:** 2\
**Last updated:** [April 24, 2022, 3:11pm UTC](https://discourse.julialang.org/t/best-current-approach-for-working-with-sparse-tensors/79937 "2022-04-24T15:11:09Z")

</div>

I would like to hear ideas about how to work with this kind of application right now in Julia. Some previous posts seem to be in line with what I’m looking for, but I’m not sure what’s the conclusion, and what’s the stat…

---

## [Finding nodal lines numerically in a volume](https://discourse.julialang.org/t/finding-nodal-lines-numerically-in-a-volume/79836)

<div class="topic-metadata">

**Author:** [@volkerkarle](https://discourse.julialang.org/u/volkerkarle)\
**Replies:** 3\
**Last updated:** [April 24, 2022, 12:13pm UTC](https://discourse.julialang.org/t/finding-nodal-lines-numerically-in-a-volume/79836 "2022-04-24T12:13:32Z")

</div>

Dear all, I’m trying to the solve the following problem. Consider some volume V \\in \\mathbb{R}^3 with an almost everywhere smooth function f(x) \\in \\mathbb{R} \\leq 0 with x \\in V . For symmetry reasons, all zero manifo…

---

## [Yolo.jl \[CUDA\] related issue](https://discourse.julialang.org/t/yolo-jl-cuda-related-issue/71882)

<div class="topic-metadata">

**Author:** [@n90](https://discourse.julialang.org/u/n90)\
**Replies:** 8\
**Last updated:** [April 24, 2022, 11:17am UTC](https://discourse.julialang.org/t/yolo-jl-cuda-related-issue/71882 "2022-04-24T11:17:24Z")

</div>

I am working on a server with Tesla M60. When i try running the sample code am getting the following error. Using CUDA.jl I checked the versioninfo() and gpu is recognized and working. What is the cause of this error and…

---

## [Problem in installing Gurobi.jl](https://discourse.julialang.org/t/problem-in-installing-gurobi-jl/79929)

<div class="topic-metadata">

**Author:** [@HosseinF](https://discourse.julialang.org/u/HosseinF)\
**Replies:** 1\
**Last updated:** [April 24, 2022, 10:22am UTC](https://discourse.julialang.org/t/problem-in-installing-gurobi-jl/79929 "2022-04-24T10:22:19Z")

</div>

Hi, I wanted to solve a two stage stochastic problem via ipopt solver but it does not solved and shows: Converged to a point of local infeasibility. Problem may be infeasible. LOCALLY INFEASIBLE┌ Warning: Stochastic pr…

---

## [Jacobian differentiation with Enzyme](https://discourse.julialang.org/t/jacobian-differentiation-with-enzyme/79912)

<div class="topic-metadata">

**Author:** [@Elmo](https://discourse.julialang.org/u/Elmo)\
**Replies:** 3\
**Last updated:** [April 24, 2022, 8:57am UTC](https://discourse.julialang.org/t/jacobian-differentiation-with-enzyme/79912 "2022-04-24T08:57:28Z")

</div>

Hi all, I am having some trouble understanding the docs for Enzyme.jl. Specifically, how to differentiate functions that return arrays and take arrays as inputs (i.e. how to get the Jacobian). I have tried a number of a…

---

## [Incorrect jacobian using ForwardDiff and sparse functions](https://discourse.julialang.org/t/incorrect-jacobian-using-forwarddiff-and-sparse-functions/79901)

<div class="topic-metadata">

**Author:** [@Elmo](https://discourse.julialang.org/u/Elmo)\
**Replies:** 4\
**Last updated:** [April 23, 2022, 7:08pm UTC](https://discourse.julialang.org/t/incorrect-jacobian-using-forwarddiff-and-sparse-functions/79901 "2022-04-23T19:08:46Z")

</div>

Hi all, Does anybody know why the following code produces different (incorrect) jacobians using ForwardDiff? The function being differentiated contains sparse matrices, but if I don’t expand them to dense matrices the j…

---

## [Multiplication of Categoricals in ForneyLab](https://discourse.julialang.org/t/multiplication-of-categoricals-in-forneylab/79894)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 0\
**Last updated:** [April 23, 2022, 2:09pm UTC](https://discourse.julialang.org/t/multiplication-of-categoricals-in-forneylab/79894 "2022-04-23T14:09:29Z")

</div>

I am trying to implement the skill modeling in Chapter 2 of Model-based machine learning by Winn and Bishop. In the course of the model, I create a factor node that is the product of two categoricals. I found out that th…

---

## [How can I use the ScikitLearn.utils module?](https://discourse.julialang.org/t/how-can-i-use-the-scikitlearn-utils-module/79892)

<div class="topic-metadata">

**Author:** [@pat](https://discourse.julialang.org/u/pat)\
**Replies:** 0\
**Last updated:** [April 23, 2022, 1:41pm UTC](https://discourse.julialang.org/t/how-can-i-use-the-scikitlearn-utils-module/79892 "2022-04-23T13:41:42Z")

</div>

I’m converting a bit of sklearn python into Julia. In the python, they use a a method called resample from sklearn.utils but I can’t find these functions in the Julia interface. It seems that ScikitLearn.jl does have a U…

---

## [What's the most efficient way to compute the matrix product A'\*B\*A for general B?](https://discourse.julialang.org/t/whats-the-most-efficient-way-to-compute-the-matrix-product-a-b-a-for-general-b/79821)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 5\
**Last updated:** [April 23, 2022, 11:39am UTC](https://discourse.julialang.org/t/whats-the-most-efficient-way-to-compute-the-matrix-product-a-b-a-for-general-b/79821 "2022-04-23T11:39:13Z")

</div>

The matrix A has orthonormal columns, but is rectangular (tall). Currently, I allocate caches C and D, and evaluate mul!(D, A', mul!(C, B, A) In my use case, A and B are somewhat large matrices, so I’d ideally like to …

---

## [Unicode symbols as arrowheads in Makie](https://discourse.julialang.org/t/unicode-symbols-as-arrowheads-in-makie/79039)

<div class="topic-metadata">

**Author:** [@kfrb](https://discourse.julialang.org/u/kfrb)\
**Replies:** 3\
**Last updated:** [April 22, 2022, 9:34pm UTC](https://discourse.julialang.org/t/unicode-symbols-as-arrowheads-in-makie/79039 "2022-04-22T21:34:12Z")

</div>

Is it possible to use other Symbols for the arrowheads in Makie? According to the docs, the arrowhead attribute is set by default to automatic, which is in 2D the symbol "▲". To use something like arrowhead="△" could be …

---

## [Compute simplex tableau from Gurobi.jl using JuMP](https://discourse.julialang.org/t/compute-simplex-tableau-from-gurobi-jl-using-jump/79395)

<div class="topic-metadata">

**Author:** [@jacob-roth](https://discourse.julialang.org/u/jacob-roth)\
**Replies:** 2\
**Last updated:** [April 22, 2022, 6:08pm UTC](https://discourse.julialang.org/t/compute-simplex-tableau-from-gurobi-jl-using-jump/79395 "2022-04-22T18:08:13Z")

</div>

I am modeling an LP in JuMP using Gurobi. How can I obtain the optimal simplex tableau? For example, consider the below LP: A = \[1; 2; 3\]' c = \[4; 5; 6\] b = 7 M = Model(Gurobi.Optimizer) set\_optimizer\_attribute(M, "Pre…

---

## [GLMakie - Connecting a Slider to update images in an axis](https://discourse.julialang.org/t/glmakie-connecting-a-slider-to-update-images-in-an-axis/79847)

<div class="topic-metadata">

**Author:** [@fmc5](https://discourse.julialang.org/u/fmc5)\
**Replies:** 2\
**Last updated:** [April 22, 2022, 4:58pm UTC](https://discourse.julialang.org/t/glmakie-connecting-a-slider-to-update-images-in-an-axis/79847 "2022-04-22T16:58:52Z")

</div>

Hi everyone, I am new to Julia and I am trying to create an interface to show for images (as you can see in the figure). I was able to connect the Slider with the red lines and put the limits of the top left image. But…

---

## [Copy\_model() equivalent for BilevelJuMP.jl](https://discourse.julialang.org/t/copy-model-equivalent-for-bileveljump-jl/79709)

<div class="topic-metadata">

**Author:** [@math\_opt](https://discourse.julialang.org/u/math_opt)\
**Replies:** 10\
**Last updated:** [April 22, 2022, 3:46pm UTC](https://discourse.julialang.org/t/copy-model-equivalent-for-bileveljump-jl/79709 "2022-04-22T15:46:55Z")

</div>

Is there a way to copy a JuMP model and use it as a building block for the lower level problem in BilevelJuMP.jl. For example: using JuMP, BilevelJuMP model = Model() @variable(model, ...) @constraint(model, ...) #Defi…

---

## [Complementarity constraints containing sum statements](https://discourse.julialang.org/t/complementarity-constraints-containing-sum-statements/79818)

<div class="topic-metadata">

**Author:** [@rubenvanbeesten](https://discourse.julialang.org/u/rubenvanbeesten)\
**Replies:** 4\
**Last updated:** [April 22, 2022, 2:09pm UTC](https://discourse.julialang.org/t/complementarity-constraints-containing-sum-statements/79818 "2022-04-22T14:09:42Z")

</div>

Hi, I’m trying to model an mathematical program with equilibrium constraints (MPEC) in Julia/JuMP. I am currently using the Complementarity.jl package. I am following this example (“bard1”) and try to adapt it to my nee…

---

## [Registering the user-defined function "multivariate normal cdf" for nonlinear modeling in JuMP](https://discourse.julialang.org/t/registering-the-user-defined-function-multivariate-normal-cdf-for-nonlinear-modeling-in-jump/79825)

<div class="topic-metadata">

**Author:** [@naouess](https://discourse.julialang.org/u/naouess)\
**Replies:** 3\
**Last updated:** [April 22, 2022, 11:46am UTC](https://discourse.julialang.org/t/registering-the-user-defined-function-multivariate-normal-cdf-for-nonlinear-modeling-in-jump/79825 "2022-04-22T11:46:16Z")

</div>

Hello Julia-community, I would like to use the multivariate normal cumulative distribution function within a constraint in JuMP. For the function, I’m using the mvnormcdf from this package MvNormalCDF.jl. Since this re…

---

## [Prevent canonical form for complex equations in Symbolics.jl](https://discourse.julialang.org/t/prevent-canonical-form-for-complex-equations-in-symbolics-jl/79800)

<div class="topic-metadata">

**Author:** [@Sciemon](https://discourse.julialang.org/u/Sciemon)\
**Replies:** 2\
**Last updated:** [April 22, 2022, 9:26am UTC](https://discourse.julialang.org/t/prevent-canonical-form-for-complex-equations-in-symbolics-jl/79800 "2022-04-22T09:26:37Z")

</div>

Symbolics.jl brings expressions to a canonical form by default (see also this discussion). Recently a new type of variable (::LiteralReal) was implemented to prevent this so you can keep the expression as it is (see here)…

---

## [How to change Makie contourf line color](https://discourse.julialang.org/t/how-to-change-makie-contourf-line-color/79794)

<div class="topic-metadata">

**Author:** [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Replies:** 2\
**Last updated:** [April 22, 2022, 9:08am UTC](https://discourse.julialang.org/t/how-to-change-makie-contourf-line-color/79794 "2022-04-22T09:08:16Z")

</div>

Hi, Does anyone knows how to control the contourf line color and width (I do not find the default one visible enough). Note that I have tried to overlay call to contour with the same arguments but, for some reasons,…

---

## [Package for sampling from a uniform distribution over a convex polytope?](https://discourse.julialang.org/t/package-for-sampling-from-a-uniform-distribution-over-a-convex-polytope/18598)

<div class="topic-metadata">

**Author:** [@ajkeith](https://discourse.julialang.org/u/ajkeith)\
**Replies:** 3\
**Last updated:** [April 22, 2022, 8:37am UTC](https://discourse.julialang.org/t/package-for-sampling-from-a-uniform-distribution-over-a-convex-polytope/18598 "2022-04-22T08:37:23Z")

</div>

Is there a Julia package for sampling from a uniform distribution over a convex polytope? I’m trying to sample a categorical distribution from an ambiguity set of categorical distributions subject to linear constraints.…

---

## [Convex.jl/Mosek/SCS setting callback](https://discourse.julialang.org/t/convex-jl-mosek-scs-setting-callback/79780)

<div class="topic-metadata">

**Author:** [@Alex\_W](https://discourse.julialang.org/u/Alex_W)\
**Replies:** 3\
**Last updated:** [April 21, 2022, 8:12pm UTC](https://discourse.julialang.org/t/convex-jl-mosek-scs-setting-callback/79780 "2022-04-21T20:12:30Z")

</div>

Hello all, I am new to Julia so I apologize if this is trivial. I am calling Mosek and SCS through Convex.jl and want to track how quickly these solvers are converging (for plotting purposes). Is it possible to pass a …

---

## [Turing Guide documentation: prob"..." examples throws errors](https://discourse.julialang.org/t/turing-guide-documentation-prob-examples-throws-errors/50319)

<div class="topic-metadata">

**Author:** [@Hakan\_Kjellerstrand](https://discourse.julialang.org/u/Hakan_Kjellerstrand)\
**Replies:** 4\
**Last updated:** [April 21, 2022, 7:18pm UTC](https://discourse.julialang.org/t/turing-guide-documentation-prob-examples-throws-errors/50319 "2022-04-21T19:18:00Z")

</div>

I’m new to Turing.jl (and quite new to Julia as well) and reading the Guide documentation ( Guide ), section “Querying Probabilities from Model or Chain”. The probability query examples are of the form prob"x = 1.0, y =…

---

## [Align ylabels in scattermatrix](https://discourse.julialang.org/t/align-ylabels-in-scattermatrix/79787)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 1\
**Last updated:** [April 21, 2022, 5:27pm UTC](https://discourse.julialang.org/t/align-ylabels-in-scattermatrix/79787 "2022-04-21T17:27:42Z")

</div>

I have the following plot: If I change the ylabelpadding, I move all ylabels by the same amount. Is there a way to set the ylabelpadding such that the ylabels are aligned? (I wish to do the same for the xlabels, but…

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

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