# Specific Domains

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

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

**Page:** 435

---

## [Heterogeneous units and ModelingToolkit](https://discourse.julialang.org/t/heterogeneous-units-and-modelingtoolkit/37922)

<div class="topic-metadata">

**Author:** [@mefob](https://discourse.julialang.org/u/mefob)\
**Replies:** 5\
**Last updated:** [July 15, 2020, 9:04pm UTC](https://discourse.julialang.org/t/heterogeneous-units-and-modelingtoolkit/37922 "2020-07-15T21:04:58Z")

</div>

I am trying to use the ModelingToolkit together with Unitful to model a coupled system of two ODEs with different units. The following code fails on ODEProblem with a DimensionError unless both units in u0 are the same: …

---

## [Error with SCIP when reoptimize after adding a constraint](https://discourse.julialang.org/t/error-with-scip-when-reoptimize-after-adding-a-constraint/43112)

<div class="topic-metadata">

**Author:** [@remi-garcia](https://discourse.julialang.org/u/remi-garcia)\
**Replies:** 2\
**Last updated:** [July 15, 2020, 6:20pm UTC](https://discourse.julialang.org/t/error-with-scip-when-reoptimize-after-adding-a-constraint/43112 "2020-07-15T18:20:32Z")

</div>

Hi, I don’t understand why SCIP throws an error when I reoptimize a model after adding a constraint. Error: """ using JuMP; using SCIP; model = Model(SCIP.Optimizer); @variable(model, x);@variable(model, y);@variable(…

---

## [Agents.jl/AgentsPlots.jl/InteractiveChaos.jl errors](https://discourse.julialang.org/t/agents-jl-agentsplots-jl-interactivechaos-jl-errors/42941)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 2\
**Last updated:** [July 15, 2020, 2:23pm UTC](https://discourse.julialang.org/t/agents-jl-agentsplots-jl-interactivechaos-jl-errors/42941 "2020-07-15T14:23:22Z")

</div>

I’m trying to build a simple model and I’m experiencing some errors that I’m unable to debug. Here’s the code I’m running: using Agents using AgentsPlots using Distributions using LightGraphs mutable struct EmployerAge…

---

## [Key 2 not found error](https://discourse.julialang.org/t/key-2-not-found-error/43105)

<div class="topic-metadata">

**Author:** [@mayar](https://discourse.julialang.org/u/mayar)\
**Replies:** 3\
**Last updated:** [July 15, 2020, 10:30am UTC](https://discourse.julialang.org/t/key-2-not-found-error/43105 "2020-07-15T10:30:42Z")

</div>

Hello, What does this error mean? “Key 2 not found” Nodes\_set=\[1,2,3\] Gen\_set=\[1,3\] Pd=\[0,-4,0\] JuMP.@variable(m, 0.1 ≤ p\[i in Gen\_set\] ≤ 2) JuMP.@variable(m, pij\[i = Nodes\_set, j = Nodes\_set\]) JuMP.@constraint(m, Pnod…

---

## [How to wrap using JuMP inside a function](https://discourse.julialang.org/t/how-to-wrap-using-jump-inside-a-function/43004)

<div class="topic-metadata">

**Author:** [@asavasci](https://discourse.julialang.org/u/asavasci)\
**Replies:** 3\
**Last updated:** [July 15, 2020, 10:06am UTC](https://discourse.julialang.org/t/how-to-wrap-using-jump-inside-a-function/43004 "2020-07-15T10:06:32Z")

</div>

I want to place “using JuMP” inside a function as follows function test() using JuMP ... end However, it gives an error syntax: "using" expression not at top level, is there a way to work around it?

---

## [Extending JuMP.@constraint macro: misunderstanding scope?](https://discourse.julialang.org/t/extending-jump-constraint-macro-misunderstanding-scope/43046)

<div class="topic-metadata">

**Author:** [@gobs](https://discourse.julialang.org/u/gobs)\
**Replies:** 2\
**Last updated:** [July 15, 2020, 8:11am UTC](https://discourse.julialang.org/t/extending-jump-constraint-macro-misunderstanding-scope/43046 "2020-07-15T08:11:53Z")

</div>

I’ve been toying with the idea of extending the JuMP.@constraint macro to make my code somewhat more concise. Here’s an example of what I currently do: con1 = @constraint(gep.model, \[i=1:10\], x\[i\] \>= 0) # Make an anonym…

---

## [Equivalent of MDAnalysis in Julia](https://discourse.julialang.org/t/equivalent-of-mdanalysis-in-julia/43070)

<div class="topic-metadata">

**Author:** [@Seanny123](https://discourse.julialang.org/u/Seanny123)\
**Replies:** 1\
**Last updated:** [July 14, 2020, 5:55pm UTC](https://discourse.julialang.org/t/equivalent-of-mdanalysis-in-julia/43070 "2020-07-14T17:55:37Z")

</div>

Continuing with the theme of my previous question, Equivalent to Rosetta in Julia, I am still trying to understand the Computational Biology tool ecosystem. Currently, I’m trying to use MDAnalysis, which is a Python pac…

---

## [CuArrays deprecated?](https://discourse.julialang.org/t/cuarrays-deprecated/43064)

<div class="topic-metadata">

**Author:** [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)\
**Replies:** 1\
**Last updated:** [July 14, 2020, 5:42pm UTC](https://discourse.julialang.org/t/cuarrays-deprecated/43064 "2020-07-14T17:42:51Z")

</div>

Hi, I’ve just realized that CuArrays seems to be deprecated in favour of CUDA.jl. Now I tried add CUDA and failed, but did work add CUDA.jl why the .jl? Anyway it is not critical… Still I have lots of code lines wr…

---

## [Trouble plotting grouped data (VegaLite.jl)](https://discourse.julialang.org/t/trouble-plotting-grouped-data-vegalite-jl/42874)

<div class="topic-metadata">

**Author:** [@Chris\_Anderson](https://discourse.julialang.org/u/Chris_Anderson)\
**Replies:** 2\
**Last updated:** [July 14, 2020, 5:14pm UTC](https://discourse.julialang.org/t/trouble-plotting-grouped-data-vegalite-jl/42874 "2020-07-14T17:14:04Z")

</div>

I’m having a lot of trouble plotting this df the way I would like. What I hope to produce is seven plots (faceted by company), each plot having gear on the x axis and Overall mean on the y axis. Each company does not n…

---

## [Looking for a blog article about DifferentialEquations.jl with custom types](https://discourse.julialang.org/t/looking-for-a-blog-article-about-differentialequations-jl-with-custom-types/43025)

<div class="topic-metadata">

**Author:** [@tomohiro\_soejima](https://discourse.julialang.org/u/tomohiro_soejima)\
**Replies:** 2\
**Last updated:** [July 14, 2020, 5:09pm UTC](https://discourse.julialang.org/t/looking-for-a-blog-article-about-differentialequations-jl-with-custom-types/43025 "2020-07-14T17:09:48Z")

</div>

Hi, This is a rather vague question, and I apologize in advance if this is considered offtopic. I remember reading this great blog article by someone (quite possibly by Dr. Chris Rackauckas) about using custom types wit…

---

## [\[Optimization\] How would you speed the RNN Flux / Zygote code up?](https://discourse.julialang.org/t/optimization-how-would-you-speed-the-rnn-flux-zygote-code-up/43037)

<div class="topic-metadata">

**Author:** [@Sixzero](https://discourse.julialang.org/u/Sixzero)\
**Replies:** 2\
**Last updated:** [July 14, 2020, 4:44pm UTC](https://discourse.julialang.org/t/optimization-how-would-you-speed-the-rnn-flux-zygote-code-up/43037 "2020-07-14T16:44:54Z")

</div>

Hey all, I worked with tensorflow1.x/2.x/pytorch/jax for years and now I found Julia language where I find there is a lot more opportunity. I would like to ask everyone so we can learn from each other, how would you op…

---

## [Julia stops during training Flux](https://discourse.julialang.org/t/julia-stops-during-training-flux/43052)

<div class="topic-metadata">

**Author:** [@MousaGhannam](https://discourse.julialang.org/u/MousaGhannam)\
**Replies:** 2\
**Last updated:** [July 14, 2020, 3:58pm UTC](https://discourse.julialang.org/t/julia-stops-during-training-flux/43052 "2020-07-14T15:58:26Z")

</div>

Hi all, I am currently trying to build a recurrent neural network using Flux, and during training Julia stops mid-way without throwing an error. I am using JuliaPro with the atom ide. julia\> versioninfo() Julia Version…

---

## [Reordering for memory contiguity/memory access](https://discourse.julialang.org/t/reordering-for-memory-contiguity-memory-access/43040)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 3\
**Last updated:** [July 14, 2020, 3:54pm UTC](https://discourse.julialang.org/t/reordering-for-memory-contiguity-memory-access/43040 "2020-07-14T15:54:39Z")

</div>

I am simulating a “mass” that obeys a law of motion. The algorithm I use to discretize to a finite grid has the property that each cell is distributed to K others after being multiplied by something else. Formally, each x…

---

## [\[ANN\] GeneticCrosses.jl](https://discourse.julialang.org/t/ann-geneticcrosses-jl/43041)

<div class="topic-metadata">

**Author:** [@pdimens](https://discourse.julialang.org/u/pdimens)\
**Replies:** 0\
**Last updated:** [July 14, 2020, 12:50pm UTC](https://discourse.julialang.org/t/ann-geneticcrosses-jl/43041 "2020-07-14T12:50:36Z")

</div>

Hello all, This past weekend I wrote a tiny offshoot to PopGen.jl that simulates the offspring resulting from breeding two individuals and it’s called GeneticCrosses.jl :sunglasses:. https://github.com/pdimens/GeneticCr…

---

## [Add CUDA adds v0.1](https://discourse.julialang.org/t/add-cuda-adds-v0-1/43032)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 10\
**Last updated:** [July 14, 2020, 11:11am UTC](https://discourse.julialang.org/t/add-cuda-adds-v0-1/43032 "2020-07-14T11:11:10Z")

</div>

I just moved from the deprecated CuArrays package to CUDA. I used add CUDA and status tells me v0.1 is installed. The most recent release is v1.1.0. Am I doing something wrong ? Maybe I have to uninstall stuff before ?

---

## [Computing function Jacobian from Zygote.pullback](https://discourse.julialang.org/t/computing-function-jacobian-from-zygote-pullback/42979)

<div class="topic-metadata">

**Author:** [@SebastianCallh](https://discourse.julialang.org/u/SebastianCallh)\
**Replies:** 6\
**Last updated:** [July 14, 2020, 5:56am UTC](https://discourse.julialang.org/t/computing-function-jacobian-from-zygote-pullback/42979 "2020-07-14T05:56:03Z")

</div>

Zygote documentation on custom adjoints states dx/dy (in the notation from the docs) is the Jacobian when x, y are vectors. I am struggling in relating this to an implementation. For a function f : R^N -\> R^M modeled wi…

---

## [ArrayFire and Flux](https://discourse.julialang.org/t/arrayfire-and-flux/42907)

<div class="topic-metadata">

**Author:** [@Ian\_Slagle](https://discourse.julialang.org/u/Ian_Slagle)\
**Replies:** 13\
**Last updated:** [July 13, 2020, 9:19pm UTC](https://discourse.julialang.org/t/arrayfire-and-flux/42907 "2020-07-13T21:19:21Z")

</div>

In part because of having an AMD GPU, the only package I can get to work with it is ArrayFire.jl. ArrayFire v3.7.0 (OpenCL, 64-bit Linux, build a4485443) \[0\] AMD: Ellesmere, 7999 MB -1- INTEL: AMD Ryzen 7 2700X Eight-Co…

---

## [Plots stopped working: "no method matching get\_color\_palette"](https://discourse.julialang.org/t/plots-stopped-working-no-method-matching-get-color-palette/38433)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 7\
**Last updated:** [July 13, 2020, 5:47pm UTC](https://discourse.julialang.org/t/plots-stopped-working-no-method-matching-get-color-palette/38433 "2020-07-13T17:47:22Z")

</div>

Plotting have suddenly stopped working. It happened around the time I ran a Pkg.update(). This is a minimal example, and the corresponding error: using Plots plot(x -\> x^2) MethodError: no method matching get\_color\_pa…

---

## [Polynomial optimization: not getting the correct solution with extractatoms](https://discourse.julialang.org/t/polynomial-optimization-not-getting-the-correct-solution-with-extractatoms/42635)

<div class="topic-metadata">

**Author:** [@aliceee](https://discourse.julialang.org/u/aliceee)\
**Replies:** 2\
**Last updated:** [July 13, 2020, 5:40pm UTC](https://discourse.julialang.org/t/polynomial-optimization-not-getting-the-correct-solution-with-extractatoms/42635 "2020-07-13T17:40:14Z")

</div>

Hi, I’m trying to get the optimal solution of a polynomial optimization problem by calculating the dual. # Create symbolic variables (not JuMP decision variables) @polyvar x1 x2 # Create a Sum of Squares JuMP model with…

---

## [Constrained weight matrices in Flux](https://discourse.julialang.org/t/constrained-weight-matrices-in-flux/42974)

<div class="topic-metadata">

**Author:** [@grero](https://discourse.julialang.org/u/grero)\
**Replies:** 1\
**Last updated:** [July 13, 2020, 12:43pm UTC](https://discourse.julialang.org/t/constrained-weight-matrices-in-flux/42974 "2020-07-13T12:43:26Z")

</div>

Is there a way to constrain the weight matrices trained by Flux? I’m interested in using Flux to train neural networks where I’d like to e.g. specify the proportion of negative and positive weights, which would simulate …

---

## [Nonuniform fast Fourier transforms](https://discourse.julialang.org/t/nonuniform-fast-fourier-transforms/4858)

<div class="topic-metadata">

**Author:** [@MikaelSlevinsky](https://discourse.julialang.org/u/MikaelSlevinsky)\
**Replies:** 10\
**Last updated:** [July 13, 2020, 11:10am UTC](https://discourse.julialang.org/t/nonuniform-fast-fourier-transforms/4858 "2020-07-13T11:10:04Z")

</div>

FastTransforms.jl v0.2.2 includes nonuniform fast Fourier transforms thanks to Alex Townsend: nufft1 assumes uniform samples and noninteger frequencies; nufft2 assumes nonuniform samples and integer frequencies; nuf…

---

## [Using Dict() to directly define variables](https://discourse.julialang.org/t/using-dict-to-directly-define-variables/42972)

<div class="topic-metadata">

**Author:** [@Emmanuel-R8](https://discourse.julialang.org/u/Emmanuel-R8)\
**Replies:** 0\
**Last updated:** [July 13, 2020, 6:27am UTC](https://discourse.julialang.org/t/using-dict-to-directly-define-variables/42972 "2020-07-13T06:27:25Z")

</div>

Inspired by this article "Time Series Structure Discovery via Probabilistic Program Synthesis, I wanted to use a dictionary to store a tree of random variables and operations. Below model1 works; model2 fails with "VarNa…

---

## [DataVoyager question](https://discourse.julialang.org/t/datavoyager-question/42205)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 2\
**Last updated:** [July 13, 2020, 5:48am UTC](https://discourse.julialang.org/t/datavoyager-question/42205 "2020-07-13T05:48:41Z")

</div>

I have spent far too long today downloading an Excel format file containing the HPC Top500 data for this month. With DataVoyager I try to load a dataframe which has bene read in from this file

---

## [Group Convolution Implementation - Work-around mutating arrays in gradient calcs](https://discourse.julialang.org/t/group-convolution-implementation-work-around-mutating-arrays-in-gradient-calcs/42931)

<div class="topic-metadata">

**Author:** [@CTM](https://discourse.julialang.org/u/CTM)\
**Replies:** 8\
**Last updated:** [July 12, 2020, 10:02pm UTC](https://discourse.julialang.org/t/group-convolution-implementation-work-around-mutating-arrays-in-gradient-calcs/42931 "2020-07-12T22:02:09Z")

</div>

I’m attempting to implement group convolutions which applies group transformations to incoming filters and then apply convolution. To do so, I create a set of transformation indices and then create an array with each of…

---

## [Need Gibbs Seawater (GSW) Equation of State to be ported to Julia](https://discourse.julialang.org/t/need-gibbs-seawater-gsw-equation-of-state-to-be-ported-to-julia/30476)

<div class="topic-metadata">

**Author:** [@truedichotomy](https://discourse.julialang.org/u/truedichotomy)\
**Replies:** 25\
**Last updated:** [July 12, 2020, 9:21pm UTC](https://discourse.julialang.org/t/need-gibbs-seawater-gsw-equation-of-state-to-be-ported-to-julia/30476 "2020-07-12T21:21:55Z")

</div>

The Gibb Seawater Equation of State (GSW) is what oceanographers use to calculate fundamental properties of seawater. Currently there are a couple implementation of the C version of the library in Julia but none of them …

---

## [Example of nonlinear optimization with Ipopt](https://discourse.julialang.org/t/example-of-nonlinear-optimization-with-ipopt/42954)

<div class="topic-metadata">

**Author:** [@mayar](https://discourse.julialang.org/u/mayar)\
**Replies:** 3\
**Last updated:** [July 12, 2020, 6:55pm UTC](https://discourse.julialang.org/t/example-of-nonlinear-optimization-with-ipopt/42954 "2020-07-12T18:55:41Z")

</div>

hello can you provide me with an example or link to an example on NL optimization with Ipopt Thank you

---

## [Simple kernel not working](https://discourse.julialang.org/t/simple-kernel-not-working/42831)

<div class="topic-metadata">

**Author:** [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)\
**Replies:** 10\
**Last updated:** [July 12, 2020, 12:20pm UTC](https://discourse.julialang.org/t/simple-kernel-not-working/42831 "2020-07-12T12:20:14Z")

</div>

Hi again guys :slight\_smile: this time I’m facing one problem that makes me think that I’m missing something very important in CUDA programming, so maybe somebody can help me out to understand what goes on. Consider thi…

---

## [Simultaneous internode I/O and compute using DistributedArrays?](https://discourse.julialang.org/t/simultaneous-internode-i-o-and-compute-using-distributedarrays/42910)

<div class="topic-metadata">

**Author:** [@Matt\_Davis](https://discourse.julialang.org/u/Matt_Davis)\
**Replies:** 0\
**Last updated:** [July 12, 2020, 12:40am UTC](https://discourse.julialang.org/t/simultaneous-internode-i-o-and-compute-using-distributedarrays/42910 "2020-07-12T00:40:22Z")

</div>

I am attempting to implement multinode tensor contraction, and I am running in to some issues. My current approach is, given two input tensors A and B and an output tensor C (all DArrays), to spawn on each worker a loop…

---

## [Solving sparse matrix using backslash, got MethodError: no method matching lu!](https://discourse.julialang.org/t/solving-sparse-matrix-using-backslash-got-methoderror-no-method-matching-lu/42906)

<div class="topic-metadata">

**Author:** [@Liang\_Chen](https://discourse.julialang.org/u/Liang_Chen)\
**Replies:** 3\
**Last updated:** [July 11, 2020, 10:05pm UTC](https://discourse.julialang.org/t/solving-sparse-matrix-using-backslash-got-methoderror-no-method-matching-lu/42906 "2020-07-11T22:05:34Z")

</div>

I want to solve a system of equation Ax = b using A\\b where A and b are sparse matrix and vector. Also matrix A is symmetric positive definite. However I got an error says: “ERROR: LoadError: MethodError: no method mat…

---

## [Gurobi "Objective Q not PSD " for Convex quadratic problem](https://discourse.julialang.org/t/gurobi-objective-q-not-psd-for-convex-quadratic-problem/42689)

<div class="topic-metadata">

**Author:** [@Ken\_Lin](https://discourse.julialang.org/u/Ken_Lin)\
**Replies:** 5\
**Last updated:** [July 11, 2020, 2:42am UTC](https://discourse.julialang.org/t/gurobi-objective-q-not-psd-for-convex-quadratic-problem/42689 "2020-07-11T02:42:10Z")

</div>

I got this error when using Gurobi 9.0.1 in Julia 1.3.1: Gurobi.GurobiError(10020, "Objective Q not PSD (diagonal adjustment of 5.8e-01 would be required)") However, I’m sure that my problem is convex, as you can see fr…

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

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