# Latest

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

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

**Page:** 690

---

## [Installation of Plots](https://discourse.julialang.org/t/installation-of-plots/99270)

<div class="topic-metadata">

**Author:** [@srtiwari73](https://discourse.julialang.org/u/srtiwari73)\
**Replies:** 2\
**Last updated:** [May 26, 2023, 6:34am UTC](https://discourse.julialang.org/t/installation-of-plots/99270 "2023-05-26T06:34:36Z")

</div>

Hi team, I am new to Julia. I am trying to install “Plots” package for my analysis. But while “using Plots” commands shows an error. Below are the details of the error. While loading “Plots” package it shows following …

---

## [Help with SparseArrays/ChainRules error](https://discourse.julialang.org/t/help-with-sparsearrays-chainrules-error/99425)

<div class="topic-metadata">

**Author:** [@ElOceanografo](https://discourse.julialang.org/u/ElOceanografo)\
**Replies:** 0\
**Last updated:** [May 26, 2023, 6:07am UTC](https://discourse.julialang.org/t/help-with-sparsearrays-chainrules-error/99425 "2023-05-26T06:07:01Z")

</div>

Ran into this error running code similar to this MWE, and was hoping someone who knows more about the AD ecosystem could help point me where to file an issue–is this a missing ChainRule, or overly-strict typing in Sparse…

---

## [Type with arbitrary number of parameters](https://discourse.julialang.org/t/type-with-arbitrary-number-of-parameters/99374)

<div class="topic-metadata">

**Author:** [@nandoconde](https://discourse.julialang.org/u/nandoconde)\
**Replies:** 10\
**Last updated:** [May 26, 2023, 5:30am UTC](https://discourse.julialang.org/t/type-with-arbitrary-number-of-parameters/99374 "2023-05-26T05:30:29Z")

</div>

Hello! I am struggling to create a type with an arbitrary number of parameters, similarly to what Tuple does. Ideally, I would use it in functions like this: julia\> function f(type\_list, string\_list) map(zip(type\_…

---

## [Modelling arbitrary non-linear expression (returned by a function) in JuMP](https://discourse.julialang.org/t/modelling-arbitrary-non-linear-expression-returned-by-a-function-in-jump/99419)

<div class="topic-metadata">

**Author:** [@pkoir](https://discourse.julialang.org/u/pkoir)\
**Replies:** 4\
**Last updated:** [May 26, 2023, 3:23am UTC](https://discourse.julialang.org/t/modelling-arbitrary-non-linear-expression-returned-by-a-function-in-jump/99419 "2023-05-26T03:23:43Z")

</div>

Hi, I’m new to Julia and JuMP so please forgive me if this is a trivial problem. I have a constraint function of the form: function g(x) \[ exp(x\[1\]) + exp(x\[2\]), x\[1\]^4 + x\[2\]^4 \] end I’m trying to mo…

---

## [Why ODE solver so slow?](https://discourse.julialang.org/t/why-ode-solver-so-slow/98773)

<div class="topic-metadata">

**Author:** [@soldin](https://discourse.julialang.org/u/soldin)\
**Replies:** 24\
**Last updated:** [May 26, 2023, 2:55am UTC](https://discourse.julialang.org/t/why-ode-solver-so-slow/98773 "2023-05-26T02:55:05Z")

</div>

The following example is taken from this page using Plots; gr() using Dates T1 = now() f(u,p,t) = 0.98u u0 = 1.0 tspan = (0.0,10.0) prob = ODEProblem(f,u0,tspan) sol = solve(prob) T2 = now() println(T2-T1) This c…

---

## [How to get the inner types of a parametric type](https://discourse.julialang.org/t/how-to-get-the-inner-types-of-a-parametric-type/99421)

<div class="topic-metadata">

**Author:** [@aleferna12](https://discourse.julialang.org/u/aleferna12)\
**Replies:** 1\
**Last updated:** [May 26, 2023, 2:34am UTC](https://discourse.julialang.org/t/how-to-get-the-inner-types-of-a-parametric-type/99421 "2023-05-26T02:34:39Z")

</div>

Hello! Is there a function that returns Real from Vector{Real}? e. g.: paramtype(Vector{Real}) should return Real. Bonus if it can be generalized for any data structure such as struct S{A, B, C} end (should return \[A, …

---

## [CategoricalArrays Binning](https://discourse.julialang.org/t/categoricalarrays-binning/99400)

<div class="topic-metadata">

**Author:** [@astro-kevin](https://discourse.julialang.org/u/astro-kevin)\
**Replies:** 3\
**Last updated:** [May 26, 2023, 1:37am UTC](https://discourse.julialang.org/t/categoricalarrays-binning/99400 "2023-05-26T01:37:11Z")

</div>

When using the cut function of CategoricalArrays, it returns CategoricalArray objects which contain CategoricalValue objects like \[0,1). However, I don’t seem to understand how to access the value that was cut, for examp…

---

## [Direct Feedback Alignment](https://discourse.julialang.org/t/direct-feedback-alignment/99414)

<div class="topic-metadata">

**Author:** [@marco\_menarini](https://discourse.julialang.org/u/marco_menarini)\
**Replies:** 0\
**Last updated:** [May 25, 2023, 11:03pm UTC](https://discourse.julialang.org/t/direct-feedback-alignment/99414 "2023-05-25T23:03:45Z")

</div>

I am trying to implement a form of Direct Feedback Aligment that allows for custom derivatives based on this paper using Flux The code seems to work correctly and fast if I pass the data points individually, but it beco…

---

## [How to plot an equivalent of matlabs' surf plot in julia](https://discourse.julialang.org/t/how-to-plot-an-equivalent-of-matlabs-surf-plot-in-julia/99413)

<div class="topic-metadata">

**Author:** [@RDuarte](https://discourse.julialang.org/u/RDuarte)\
**Replies:** 1\
**Last updated:** [May 25, 2023, 10:50pm UTC](https://discourse.julialang.org/t/how-to-plot-an-equivalent-of-matlabs-surf-plot-in-julia/99413 "2023-05-25T22:50:22Z")

</div>

Dear all, How can I plot a 3D plot but from a top view. In fact what Im searching for is an equivalent function of surf() in matlab. Thanks in advance.

---

## [Is Possible to Know if a Variable Changed in Memory?](https://discourse.julialang.org/t/is-possible-to-know-if-a-variable-changed-in-memory/91210)

<div class="topic-metadata">

**Author:** [@cdelv](https://discourse.julialang.org/u/cdelv)\
**Replies:** 5\
**Last updated:** [May 25, 2023, 10:49pm UTC](https://discourse.julialang.org/t/is-possible-to-know-if-a-variable-changed-in-memory/91210 "2023-05-25T22:49:57Z")

</div>

This question is just for curiosity, but is it possible to know if a variables changed? For example v = \[1,2,3\] changed?(v) false v\[1\]=2 changed?(v) true

---

## [DiffEq documentation example slower on GPU (33 sec) than on CPU (0.14 sec)](https://discourse.julialang.org/t/diffeq-documentation-example-slower-on-gpu-33-sec-than-on-cpu-0-14-sec/99407)

<div class="topic-metadata">

**Author:** [@jogama](https://discourse.julialang.org/u/jogama)\
**Replies:** 4\
**Last updated:** [May 25, 2023, 10:41pm UTC](https://discourse.julialang.org/t/diffeq-documentation-example-slower-on-gpu-33-sec-than-on-cpu-0-14-sec/99407 "2023-05-25T22:41:31Z")

</div>

Hello, We were surprized to see that example code on the online documentation ran slower on the GPU than on the CPU. https://docs.sciml.ai/DiffEqGPU/stable/getting\_started/#Simple-Example-of-Within-Method-GPU-Paralleli…

---

## [Why map function in named tuple is outputing only one item](https://discourse.julialang.org/t/why-map-function-in-named-tuple-is-outputing-only-one-item/99410)

<div class="topic-metadata">

**Author:** [@jcbritobr](https://discourse.julialang.org/u/jcbritobr)\
**Replies:** 3\
**Last updated:** [May 25, 2023, 9:40pm UTC](https://discourse.julialang.org/t/why-map-function-in-named-tuple-is-outputing-only-one-item/99410 "2023-05-25T21:40:37Z")

</div>

Hello, good afternoon Why this named tuple is being outputed with a single mean when using map function? aq = readdlm("data.dat") data = (set1=(x=aq\[:,1\], y=aq\[:, 2\]), set2=(x=aq\[:,3\], y=aq\[:, 4\]), set3=(x=aq\[:…

---

## [Creating a module with python dependencies](https://discourse.julialang.org/t/creating-a-module-with-python-dependencies/99078)

<div class="topic-metadata">

**Author:** [@Ignacio\_Loaiza](https://discourse.julialang.org/u/Ignacio_Loaiza)\
**Replies:** 6\
**Last updated:** [May 25, 2023, 9:22pm UTC](https://discourse.julialang.org/t/creating-a-module-with-python-dependencies/99078 "2023-05-25T21:22:45Z")

</div>

Hi everyone! I wrote some Julia code that I’m trying to convert into a module so I can interface it with some python code through JuliaCall. My module uses PythonCall to run some python code. I am currently using the li…

---

## [How to find the index of the two largest values in a 1D array](https://discourse.julialang.org/t/how-to-find-the-index-of-the-two-largest-values-in-a-1d-array/99341)

<div class="topic-metadata">

**Author:** [@HelgavonLichtenstein](https://discourse.julialang.org/u/HelgavonLichtenstein)\
**Replies:** 8\
**Last updated:** [May 25, 2023, 7:51pm UTC](https://discourse.julialang.org/t/how-to-find-the-index-of-the-two-largest-values-in-a-1d-array/99341 "2023-05-25T19:51:23Z")

</div>

Hi, I’m trying to find the index of the two largest values in an array. I’ve been trying to work through find n smallest values in an n dims array but am getting confused because that is a 3D array. This probably has a…

---

## [Add local and purgeable cuts in CPLEX](https://discourse.julialang.org/t/add-local-and-purgeable-cuts-in-cplex/99378)

<div class="topic-metadata">

**Author:** [@Zacharie\_ALES](https://discourse.julialang.org/u/Zacharie_ALES)\
**Replies:** 4\
**Last updated:** [May 25, 2023, 7:48pm UTC](https://discourse.julialang.org/t/add-local-and-purgeable-cuts-in-cplex/99378 "2023-05-25T19:48:43Z")

</div>

I am using CPLEX.jl and I add cuts in a callback with this syntax: con = @build\_constraint(x \<= 0) MOI.submit(myModel, MOI.UserCut(cb\_data), con) CPLEX library normally has several parameters when addin…

---

## [List of errors and what they mean](https://discourse.julialang.org/t/list-of-errors-and-what-they-mean/99390)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 4\
**Last updated:** [May 25, 2023, 4:21pm UTC](https://discourse.julialang.org/t/list-of-errors-and-what-they-mean/99390 "2023-05-25T16:21:34Z")

</div>

Is there somewhere where I can see a list of Julia errors, and what they mean? Some are mostly self-explanatory (although it depends on your experience with this kind of stuff!), and some are not. And some might not be p…

---

## [Very slow startup in VScode](https://discourse.julialang.org/t/very-slow-startup-in-vscode/46996)

<div class="topic-metadata">

**Author:** [@MathMan](https://discourse.julialang.org/u/MathMan)\
**Replies:** 11\
**Last updated:** [May 25, 2023, 3:48pm UTC](https://discourse.julialang.org/t/very-slow-startup-in-vscode/46996 "2023-05-25T15:48:02Z")

</div>

I am new to Julia and I am using vscode with the Julia extension to run code. Unfortunately, Julia responds incredibly slow. Outputs into the terminal take 7-8 seconds every time I run this simple script. a = 2 b = 3 c …

---

## [Making a view of a combination of array indexes and scalars, creating an array to send to a function](https://discourse.julialang.org/t/making-a-view-of-a-combination-of-array-indexes-and-scalars-creating-an-array-to-send-to-a-function/99332)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 7\
**Last updated:** [May 25, 2023, 3:24pm UTC](https://discourse.julialang.org/t/making-a-view-of-a-combination-of-array-indexes-and-scalars-creating-an-array-to-send-to-a-function/99332 "2023-05-25T15:24:47Z")

</div>

I have a combination of scalar values, and values stored in vectors. Is there a good way to create a view of these and send to other functions, rather than allocating it all to a new array? I am performance de-bugging a…

---

## [MethodOfLines discretization error: missing initial conditions](https://discourse.julialang.org/t/methodoflines-discretization-error-missing-initial-conditions/98828)

<div class="topic-metadata">

**Author:** [@A\_09](https://discourse.julialang.org/u/A_09)\
**Replies:** 8\
**Last updated:** [May 25, 2023, 2:38pm UTC](https://discourse.julialang.org/t/methodoflines-discretization-error-missing-initial-conditions/98828 "2023-05-25T14:38:41Z")

</div>

I have developed a code for solving differential equations and I have been trying to solve it using the ModelingToolkit package and the MethodOfLines: begin @parameters t, r, x \`@variables T(…) Dr=Differential(r) Drr…

---

## [Return the variable name as a String](https://discourse.julialang.org/t/return-the-variable-name-as-a-string/99340)

<div class="topic-metadata">

**Author:** [@geo1093](https://discourse.julialang.org/u/geo1093)\
**Replies:** 8\
**Last updated:** [May 25, 2023, 2:20pm UTC](https://discourse.julialang.org/t/return-the-variable-name-as-a-string/99340 "2023-05-25T14:20:20Z")

</div>

Hi, Is it possible to define a function, structure, macro or whatever to get sth like this: julia\> a = somefunc() “a” where the string contains the variable name ? I would like a way to print the variable name with…

---

## [Operations Research position @SINTEF (Norway)](https://discourse.julialang.org/t/operations-research-position-sintef-norway/99365)

<div class="topic-metadata">

**Author:** [@hellemo](https://discourse.julialang.org/u/hellemo)\
**Replies:** 0\
**Last updated:** [May 25, 2023, 7:56am UTC](https://discourse.julialang.org/t/operations-research-position-sintef-norway/99365 "2023-05-25T07:56:19Z")

</div>

The Operations Research and Economics group in the department Sustainable Energy Technology at SINTEF Industry has open positions for research scientists. We have a wide portfolio of projects using Julia and JuMP in part…

---

## [Using Tuples within ModelingToolkit.jl?](https://discourse.julialang.org/t/using-tuples-within-modelingtoolkit-jl/99350)

<div class="topic-metadata">

**Author:** [@MarkIlg](https://discourse.julialang.org/u/MarkIlg)\
**Replies:** 1\
**Last updated:** [May 25, 2023, 1:01pm UTC](https://discourse.julialang.org/t/using-tuples-within-modelingtoolkit-jl/99350 "2023-05-25T13:01:16Z")

</div>

Trying to utlized MTK on a larger simulation and having trouble with functions that return tuples that are a function of state. For example: function foo(x) return 1.0,2.0 end @register\_symbolic foo(x) function pl…

---

## [The most efficient way to calculate the pairwise correlation between rows of a large Matrix{Float64}](https://discourse.julialang.org/t/the-most-efficient-way-to-calculate-the-pairwise-correlation-between-rows-of-a-large-matrix-float64/99313)

<div class="topic-metadata">

**Author:** [@Shayan](https://discourse.julialang.org/u/Shayan)\
**Replies:** 10\
**Last updated:** [May 25, 2023, 11:02am UTC](https://discourse.julialang.org/t/the-most-efficient-way-to-calculate-the-pairwise-correlation-between-rows-of-a-large-matrix-float64/99313 "2023-05-25T11:02:54Z")

</div>

I wonder the most efficient way to calculate the pairwise correlation between rows of a Matrix{Float64} with a large number of rows and columns. I know “large” is subjective. Suppose the large is (5000, 50000) (meaning 5…

---

## [Adding NL expressions to an AffExpr type Vector](https://discourse.julialang.org/t/adding-nl-expressions-to-an-affexpr-type-vector/99279)

<div class="topic-metadata">

**Author:** [@PatrickeTownsend](https://discourse.julialang.org/u/PatrickeTownsend)\
**Replies:** 5\
**Last updated:** [May 25, 2023, 8:32am UTC](https://discourse.julialang.org/t/adding-nl-expressions-to-an-affexpr-type-vector/99279 "2023-05-25T08:32:23Z")

</div>

Hello again everybody, I’m trying to generate a Vector where which element is a NL expression, here is the code where I’m trying to implement it. register(rocket2d\_hs\_2, :StateFunc, 10, StateFunc; autodiff=true) x\_c = …

---

## [Why can Channels not be used by threads?](https://discourse.julialang.org/t/why-can-channels-not-be-used-by-threads/99353)

<div class="topic-metadata">

**Author:** [@hsgg](https://discourse.julialang.org/u/hsgg)\
**Replies:** 8\
**Last updated:** [May 25, 2023, 3:59am UTC](https://discourse.julialang.org/t/why-can-channels-not-be-used-by-threads/99353 "2023-05-25T03:59:51Z")

</div>

I am using Channels to synchronize and distribute workloads between threads (and it is working really well). However, the documentation about @threads states that the assumptions that go into the threading model mean th…

---

## [Extending @formula syntax is difficult to understand](https://discourse.julialang.org/t/extending-formula-syntax-is-difficult-to-understand/99326)

<div class="topic-metadata">

**Author:** [@xuanquansheng](https://discourse.julialang.org/u/xuanquansheng)\
**Replies:** 3\
**Last updated:** [May 25, 2023, 2:27am UTC](https://discourse.julialang.org/t/extending-formula-syntax-is-difficult-to-understand/99326 "2023-05-25T02:27:57Z")

</div>

Extending @formula syntax in StatsModels.jl is difficult to understand. I read the examples of ploy in the official documentation, but I feel that the comments are not detailed enough, and I still don’t quite understand…

---

## [How to intrepret the results from the 'cdf()\` and \`quantile()\` function?](https://discourse.julialang.org/t/how-to-intrepret-the-results-from-the-cdf-and-quantile-function/99354)

<div class="topic-metadata">

**Author:** [@Hugo](https://discourse.julialang.org/u/Hugo)\
**Replies:** 1\
**Last updated:** [May 24, 2023, 11:12pm UTC](https://discourse.julialang.org/t/how-to-intrepret-the-results-from-the-cdf-and-quantile-function/99354 "2023-05-24T23:12:55Z")

</div>

Hey, folks I’d like some help understanding the cdf and quantile functions. Let x \\in \\mathbb{R}^n be a data vector. using Random Random.seed!(12345) x = rand(Uniform(100, 500), 10000) Now, I want to calculate the c…

---

## [Assigning matrices](https://discourse.julialang.org/t/assigning-matrices/99342)

<div class="topic-metadata">

**Author:** [@RDuarte](https://discourse.julialang.org/u/RDuarte)\
**Replies:** 4\
**Last updated:** [May 24, 2023, 10:59pm UTC](https://discourse.julialang.org/t/assigning-matrices/99342 "2023-05-24T22:59:37Z")

</div>

Dear all; I’m new in Julia and I’m trying to index one matrix to another. Let’s say, I have a matrix A of zero (242x970) and I want to assign a Matrix B,C and D in a specific part of A. A=zeros(M+1,nf+1); A\[2:M+1,2:n…

---

## [\[ANN\] GModelFit.jl: a model fitting framework for Julia](https://discourse.julialang.org/t/ann-gmodelfit-jl-a-model-fitting-framework-for-julia/95725)

<div class="topic-metadata">

**Author:** [@gcalderone](https://discourse.julialang.org/u/gcalderone)\
**Replies:** 1\
**Last updated:** [May 24, 2023, 10:30pm UTC](https://discourse.julialang.org/t/ann-gmodelfit-jl-a-model-fitting-framework-for-julia/95725 "2023-05-24T22:30:54Z")

</div>

\[ANN\] GModelFit.jl: a model fitting framework for Julia. Dear community, after a few years of testing and improving the user interface, the GModelFit data-driven model fitting framework for Julia is now released!! The …

---

## [Error precompiling Plots.jl](https://discourse.julialang.org/t/error-precompiling-plots-jl/99349)

<div class="topic-metadata">

**Author:** [@leonbello](https://discourse.julialang.org/u/leonbello)\
**Replies:** 0\
**Last updated:** [May 24, 2023, 8:14pm UTC](https://discourse.julialang.org/t/error-precompiling-plots-jl/99349 "2023-05-24T20:14:58Z")

</div>

I am getting a weird precompiling warning each time I’m trying to use Plots.jl: \[ Info: Precompiling Plots \[91a5bcdd-55d7-5caf-9e0b-520d859cae80\] ┌ Warning: The call to compilecache failed to create a usable precompiled…

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

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