# Specific Domains

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

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

**Page:** 172

---

## [Getting started example not running Optimization.jl](https://discourse.julialang.org/t/getting-started-example-not-running-optimization-jl/102944)

<div class="topic-metadata">

**Author:** [@p\_f](https://discourse.julialang.org/u/p_f)\
**Replies:** 3\
**Last updated:** [August 18, 2023, 5:34pm UTC](https://discourse.julialang.org/t/getting-started-example-not-running-optimization-jl/102944 "2023-08-18T17:34:12Z")

</div>

I’m assuming I’m missing something stupid, but I am just copy pasting code from the getting started section Getting Started with Optimization in Julia · Optimization.jl The very first block of code runs fine. The first …

---

## [RemoteS example Aqua orbits fails](https://discourse.julialang.org/t/remotes-example-aqua-orbits-fails/102844)

<div class="topic-metadata">

**Author:** [@jaksaa](https://discourse.julialang.org/u/jaksaa)\
**Replies:** 3\
**Last updated:** [August 18, 2023, 12:25pm UTC](https://discourse.julialang.org/t/remotes-example-aqua-orbits-fails/102844 "2023-08-18T12:25:05Z")

</div>

From this thread A native Julia package for satellite images? - #20 by joa-quim If better to be in the above thread please move. Have version: Julia Version 1.9.2 \[5752ebe1\] GMT v1.3.1 \[26020ff4\] RemoteS v1.0.0 \[6a…

---

## [How to make \`Colon()\` stable in CUDA kernel](https://discourse.julialang.org/t/how-to-make-colon-stable-in-cuda-kernel/102934)

<div class="topic-metadata">

**Author:** [@huiyuxie](https://discourse.julialang.org/u/huiyuxie)\
**Replies:** 1\
**Last updated:** [August 18, 2023, 11:21am UTC](https://discourse.julialang.org/t/how-to-make-colon-stable-in-cuda-kernel/102934 "2023-08-18T11:21:04Z")

</div>

Hi! I’m wondering is there any way to make Colon() stable when calling the CUDA kernel. For example (I’ve simplified the sample case here as the practical one is complex), # Helper function function view\_helper(u, arg1,…

---

## [Causal.jl vs ModelingToolkit.jl for causal, discrete-time, and Simulink-like systems](https://discourse.julialang.org/t/causal-jl-vs-modelingtoolkit-jl-for-causal-discrete-time-and-simulink-like-systems/82881)

<div class="topic-metadata">

**Author:** [@tapyu](https://discourse.julialang.org/u/tapyu)\
**Replies:** 36\
**Last updated:** [August 18, 2023, 8:41am UTC](https://discourse.julialang.org/t/causal-jl-vs-modelingtoolkit-jl-for-causal-discrete-time-and-simulink-like-systems/82881 "2023-08-18T08:41:27Z")

</div>

I am an experienced-Simulink user who is trying to move to Julia. My goal is to develop discrete-time(probably stochastic) systems. As a former Simulink user, I always think in terms of block diagrams and signal flows. R…

---

## [Change Latex font in Makie](https://discourse.julialang.org/t/change-latex-font-in-makie/72729)

<div class="topic-metadata">

**Author:** [@Elmo](https://discourse.julialang.org/u/Elmo)\
**Replies:** 11\
**Last updated:** [August 18, 2023, 7:43am UTC](https://discourse.julialang.org/t/change-latex-font-in-makie/72729 "2023-08-18T07:43:32Z")

</div>

Hi all, Is there a way to change the font Makie uses when you want to typeset labels (etc…) in Latex? See here for a MWE: using CairoMakie, LaTeXStrings fontpath = joinpath(pwd(), "fonts", "tex-gyre", "texgyreheros-bo…

---

## [Generic way to change float precision in FluxML](https://discourse.julialang.org/t/generic-way-to-change-float-precision-in-fluxml/102893)

<div class="topic-metadata">

**Author:** [@pat-alt](https://discourse.julialang.org/u/pat-alt)\
**Replies:** 3\
**Last updated:** [August 18, 2023, 6:26am UTC](https://discourse.julialang.org/t/generic-way-to-change-float-precision-in-fluxml/102893 "2023-08-18T06:26:44Z")

</div>

I’ve recently started using FastAI.jl and firstly want to say how much I appreciate the efforts of anyone involved here - this is really cool! When going through chapter 5 of the fast.ai book, I just came across the poi…

---

## [About the generation of JuMP model files of MIQCP type from other platforms such as GAMS or AMLP](https://discourse.julialang.org/t/about-the-generation-of-jump-model-files-of-miqcp-type-from-other-platforms-such-as-gams-or-amlp/102914)

<div class="topic-metadata">

**Author:** [@JackaChou](https://discourse.julialang.org/u/JackaChou)\
**Replies:** 1\
**Last updated:** [August 18, 2023, 5:23am UTC](https://discourse.julialang.org/t/about-the-generation-of-jump-model-files-of-miqcp-type-from-other-platforms-such-as-gams-or-amlp/102914 "2023-08-18T05:23:04Z")

</div>

I want to solve a MIQCP type problem which is written in GAMS and the JuMP version is generated using the convert function. A painpoint is that the generated JuMP file is not recognized as a MIQCP problem but a general M…

---

## [Line labels in subplot impacted by other subplots](https://discourse.julialang.org/t/line-labels-in-subplot-impacted-by-other-subplots/102924)

<div class="topic-metadata">

**Author:** [@markowkes](https://discourse.julialang.org/u/markowkes)\
**Replies:** 1\
**Last updated:** [August 17, 2023, 9:58pm UTC](https://discourse.julialang.org/t/line-labels-in-subplot-impacted-by-other-subplots/102924 "2023-08-17T21:58:54Z")

</div>

I have a plot recipe that creates a few subplots. However, the labels that are displayed in the legend are not in the correct order in some cases and I do not understand what is wrong. For example, in this MWE, the fun…

---

## [Is there a package for "random vectors" like rv in R?](https://discourse.julialang.org/t/is-there-a-package-for-random-vectors-like-rv-in-r/102787)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 8\
**Last updated:** [August 17, 2023, 3:57pm UTC](https://discourse.julialang.org/t/is-there-a-package-for-random-vectors-like-rv-in-r/102787 "2023-08-17T15:57:21Z")

</div>

Kerman and Gelman (2007) introduced an interesting way to think about posterior simulations, implemented in rv in R. The basic idea is to implement (a vector of) posterior draws as first-class values, and overload arithm…

---

## [Simple matrix multiplication using MtlArray kills REPL](https://discourse.julialang.org/t/simple-matrix-multiplication-using-mtlarray-kills-repl/102905)

<div class="topic-metadata">

**Author:** [@Bill\_Holmes](https://discourse.julialang.org/u/Bill_Holmes)\
**Replies:** 4\
**Last updated:** [August 17, 2023, 2:44pm UTC](https://discourse.julialang.org/t/simple-matrix-multiplication-using-mtlarray-kills-repl/102905 "2023-08-17T14:44:25Z")

</div>

First off, for those working on the development of Metal.jl, if you read this, thank you! Now for my issue / bug. In trying to do something with metal, I ran into the following reproducible problem. Consider the simple …

---

## [Float64 but with single precision](https://discourse.julialang.org/t/float64-but-with-single-precision/102899)

<div class="topic-metadata">

**Author:** [@Dario-Rosa85](https://discourse.julialang.org/u/Dario-Rosa85)\
**Replies:** 1\
**Last updated:** [August 17, 2023, 10:30am UTC](https://discourse.julialang.org/t/float64-but-with-single-precision/102899 "2023-08-17T10:30:44Z")

</div>

Sorry for the question which might look a bit stupid. I am preparing an example to show that certain numerical methods are unstable. To do this, I would need a method to use a Float64 number but, for the example, I would…

---

## [Rename column if its name matches to a name in given list](https://discourse.julialang.org/t/rename-column-if-its-name-matches-to-a-name-in-given-list/102386)

<div class="topic-metadata">

**Author:** [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Replies:** 26\
**Last updated:** [August 17, 2023, 9:39am UTC](https://discourse.julialang.org/t/rename-column-if-its-name-matches-to-a-name-in-given-list/102386 "2023-08-17T09:39:51Z")

</div>

My Problem is :heavy\_minus\_sign: If name in names(dataframe) matches to a name in a given list then rename it to some other specified name. names(dataframe)=\["Date", "UT\_start", "t-T0", "Filter", "Exp.", "OT", "Err.", "…

---

## [Mix-Precision training using Models of Metalhead (Flux.jl) or Boltz (Lux.jl)](https://discourse.julialang.org/t/mix-precision-training-using-models-of-metalhead-flux-jl-or-boltz-lux-jl/102857)

<div class="topic-metadata">

**Author:** [@lgmendesDynamics](https://discourse.julialang.org/u/lgmendesDynamics)\
**Replies:** 3\
**Last updated:** [August 16, 2023, 11:30pm UTC](https://discourse.julialang.org/t/mix-precision-training-using-models-of-metalhead-flux-jl-or-boltz-lux-jl/102857 "2023-08-16T23:30:20Z")

</div>

It is possible to train Deep Learning models for computer vision available in packages like Metalhead (Flux) or Boltz (Lux) with mix-precision?

---

## [Computing value and first & second derivatives of a scalar function with scalar input, using ForwardDiff](https://discourse.julialang.org/t/computing-value-and-first-second-derivatives-of-a-scalar-function-with-scalar-input-using-forwarddiff/102866)

<div class="topic-metadata">

**Author:** [@user664303](https://discourse.julialang.org/u/user664303)\
**Replies:** 6\
**Last updated:** [August 16, 2023, 10:04pm UTC](https://discourse.julialang.org/t/computing-value-and-first-second-derivatives-of-a-scalar-function-with-scalar-input-using-forwarddiff/102866 "2023-08-16T22:04:33Z")

</div>

I cannot find, either in the documentation of ForwardDiff, or on the web more widely, any information on how to compute the second derivative of a scalar function with a scalar input. How can I do this? (Given a function…

---

## [ConfusionMatrix display in VSCode when there are ~ 16 categories](https://discourse.julialang.org/t/confusionmatrix-display-in-vscode-when-there-are-16-categories/102763)

<div class="topic-metadata">

**Author:** [@roeya](https://discourse.julialang.org/u/roeya)\
**Replies:** 3\
**Last updated:** [August 16, 2023, 9:34pm UTC](https://discourse.julialang.org/t/confusionmatrix-display-in-vscode-when-there-are-16-categories/102763 "2023-08-16T21:34:16Z")

</div>

When trying to display small confusion matrix for example for 4 categories classifier I get: ┌───────────────────────────────────────────────────────┐ │ Ground Truth …

---

## [How to pass a mutable struct to CUDA kernel argument](https://discourse.julialang.org/t/how-to-pass-a-mutable-struct-to-cuda-kernel-argument/102804)

<div class="topic-metadata">

**Author:** [@huiyuxie](https://discourse.julialang.org/u/huiyuxie)\
**Replies:** 3\
**Last updated:** [August 16, 2023, 8:39pm UTC](https://discourse.julialang.org/t/how-to-pass-a-mutable-struct-to-cuda-kernel-argument/102804 "2023-08-16T20:39:03Z")

</div>

Hi all! I’m exploring ways to pass a mutable struct as an argument to a CUDA kernel. For example, # Define a custom struct here mutable struct MyStruct field1::Float32 field2::Float32 field3::Float32 ...…

---

## [Connecting a simple first-order solver to solve standard form linear program to JuMP](https://discourse.julialang.org/t/connecting-a-simple-first-order-solver-to-solve-standard-form-linear-program-to-jump/95694)

<div class="topic-metadata">

**Author:** [@Shuvomoy\_Das\_Gupta](https://discourse.julialang.org/u/Shuvomoy_Das_Gupta)\
**Replies:** 37\
**Last updated:** [August 16, 2023, 8:14pm UTC](https://discourse.julialang.org/t/connecting-a-simple-first-order-solver-to-solve-standard-form-linear-program-to-jump/95694 "2023-08-16T20:14:48Z")

</div>

Dear All, To demonstrate the usage of first-order algorithms to solve linear programs in a graduate course that I am TAing (MIT 15.084: Nonlinear Optimization, link:https://gitlab.com/vanparys-courses/15.084-sp23) I hav…

---

## [Package for specification of hierarchical statistical models](https://discourse.julialang.org/t/package-for-specification-of-hierarchical-statistical-models/102792)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 1\
**Last updated:** [August 16, 2023, 6:47pm UTC](https://discourse.julialang.org/t/package-for-specification-of-hierarchical-statistical-models/102792 "2023-08-16T18:47:21Z")

</div>

Suppose we are given a set of random variables X\_1, X\_2, \\ldots, X\_n and that we want to specify a statistical model involving these variables. For example, one may be interested in specifying two marginals X\_1 \\sim \\ma…

---

## [Load a pre-trained Pytorch model in Julia](https://discourse.julialang.org/t/load-a-pre-trained-pytorch-model-in-julia/96932)

<div class="topic-metadata">

**Author:** [@Jian\_ZUO](https://discourse.julialang.org/u/Jian_ZUO)\
**Replies:** 5\
**Last updated:** [August 16, 2023, 3:30pm UTC](https://discourse.julialang.org/t/load-a-pre-trained-pytorch-model-in-julia/96932 "2023-08-16T15:30:15Z")

</div>

Hi all, What are the best practices to load a pre-trained pytorch model in Julia (e.g. Flux.jl)? Thank you!

---

## [How efficient is the automatic differentation and optimization in comparison to PyTorch](https://discourse.julialang.org/t/how-efficient-is-the-automatic-differentation-and-optimization-in-comparison-to-pytorch/102824)

<div class="topic-metadata">

**Author:** [@roflmaostc](https://discourse.julialang.org/u/roflmaostc)\
**Replies:** 6\
**Last updated:** [August 16, 2023, 3:24pm UTC](https://discourse.julialang.org/t/how-efficient-is-the-automatic-differentation-and-optimization-in-comparison-to-pytorch/102824 "2023-08-16T15:24:16Z")

</div>

Hi all, how efficient is the current Julia AD and optimization landscape in comparsion to let’s say PyTorch? Python For example in PyTorch I can do arr1 = arr1.requires\_grad\_(True) arr2 = arr2.requires\_grad\_(True) opt…

---

## [Mann-Whitney U Test vs. simple Bayesian inference](https://discourse.julialang.org/t/mann-whitney-u-test-vs-simple-bayesian-inference/99676)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 2\
**Last updated:** [August 16, 2023, 2:02pm UTC](https://discourse.julialang.org/t/mann-whitney-u-test-vs-simple-bayesian-inference/99676 "2023-08-16T14:02:31Z")

</div>

I’m looking at the Mann-Whitney U test from HypothesisTests.jl, and it is described as follows: Perform a Mann-Whitney U test of the null hypothesis that the probability that an observation drawn from the same populati…

---

## [Autodiff of vector inputs with Enzyme.jl (and possibly Optimization.jl)](https://discourse.julialang.org/t/autodiff-of-vector-inputs-with-enzyme-jl-and-possibly-optimization-jl/101485)

<div class="topic-metadata">

**Author:** [@told](https://discourse.julialang.org/u/told)\
**Replies:** 9\
**Last updated:** [August 16, 2023, 8:54am UTC](https://discourse.julialang.org/t/autodiff-of-vector-inputs-with-enzyme-jl-and-possibly-optimization-jl/101485 "2023-08-16T08:54:03Z")

</div>

So we started a new huge project for which we aim to use Optimization.jl with Enzyme.jl as AD backend. We came up with some early prototypes and plugged that into Optimization.jl, unfortunately not very succesful (It se…

---

## [Bugs on Using CUDA.jl on Jeston AGX Orin Developer Kit](https://discourse.julialang.org/t/bugs-on-using-cuda-jl-on-jeston-agx-orin-developer-kit/102847)

<div class="topic-metadata">

**Author:** [@Sujaio](https://discourse.julialang.org/u/Sujaio)\
**Replies:** 1\
**Last updated:** [August 16, 2023, 7:25am UTC](https://discourse.julialang.org/t/bugs-on-using-cuda-jl-on-jeston-agx-orin-developer-kit/102847 "2023-08-16T07:25:04Z")

</div>

Iv deployed juliaup for Nvidia Orin, when I use different version of julia and test the CUDA, the simple computing of matrix multiplication is out of GPU memory. Is someone using CUDA on Orin?

---

## [NLopt optimizer just return the initial value](https://discourse.julialang.org/t/nlopt-optimizer-just-return-the-initial-value/102820)

<div class="topic-metadata">

**Author:** [@MKY](https://discourse.julialang.org/u/MKY)\
**Replies:** 3\
**Last updated:** [August 16, 2023, 2:25am UTC](https://discourse.julialang.org/t/nlopt-optimizer-just-return-the-initial-value/102820 "2023-08-16T02:25:19Z")

</div>

opt = Opt(:LD\_SLSQP,4) opt.lower\_bounds = \[0,0,0,0\] opt.ftol\_abs = 1e-20 opt.min\_objective = risk\_budget\_objective equality\_constraint!(opt,weights -\> total\_weight\_constraint(x)) (optf,optx,ret) = optimize(opt,\[0.25,0.25…

---

## [Bizarre d(variable) syntax encountered when reading model written in .mdl file](https://discourse.julialang.org/t/bizarre-d-variable-syntax-encountered-when-reading-model-written-in-mdl-file/102645)

<div class="topic-metadata">

**Author:** [@ajcost](https://discourse.julialang.org/u/ajcost)\
**Replies:** 5\
**Last updated:** [August 15, 2023, 8:45pm UTC](https://discourse.julialang.org/t/bizarre-d-variable-syntax-encountered-when-reading-model-written-in-mdl-file/102645 "2023-08-15T20:45:16Z")

</div>

I was wondering if anyone had familiarity with something called MoDeL language. It seems to be some AML type optimization language. I found bizarre syntax in which constraints are written with d(variable). Meaning “chang…

---

## [Understanding an Enzyme Warning Message](https://discourse.julialang.org/t/understanding-an-enzyme-warning-message/102825)

<div class="topic-metadata">

**Author:** [@nina](https://discourse.julialang.org/u/nina)\
**Replies:** 1\
**Last updated:** [August 15, 2023, 7:38pm UTC](https://discourse.julialang.org/t/understanding-an-enzyme-warning-message/102825 "2023-08-15T19:38:18Z")

</div>

When training a UDE with many parameters (\>100) I get an Enzyme warning if I do not select the AD algorithm a-priori. This warning appears not once, but several times during the optimization process. While I can obviousl…

---

## [Plots weird problem plotting a piecewise function at discontinuity points](https://discourse.julialang.org/t/plots-weird-problem-plotting-a-piecewise-function-at-discontinuity-points/102811)

<div class="topic-metadata">

**Author:** [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)\
**Replies:** 13\
**Last updated:** [August 15, 2023, 7:34pm UTC](https://discourse.julialang.org/t/plots-weird-problem-plotting-a-piecewise-function-at-discontinuity-points/102811 "2023-08-15T19:34:05Z")

</div>

using Plots; g\_k =0.0:0.01:10.0; A1=1.0; A2=2.0; α=0.33; κ2 =3.0; κ̂2 = κ2 / (1.0 - ((A1/A2)^(1/α))); #3.41842 function f3p(k) if (k \< κ̂2) return α\*A1\*(k^(α - 1.0)) elseif (k \> κ̂2) return α\*A2\*(…

---

## [How to sample from MvNormal without allocating?](https://discourse.julialang.org/t/how-to-sample-from-mvnormal-without-allocating/96646)

<div class="topic-metadata">

**Author:** [@markmbaum](https://discourse.julialang.org/u/markmbaum)\
**Replies:** 5\
**Last updated:** [August 15, 2023, 2:29pm UTC](https://discourse.julialang.org/t/how-to-sample-from-mvnormal-without-allocating/96646 "2023-08-15T14:29:28Z")

</div>

Even using the in-place method rand! to sample from a MvNormal distribution seems to allocate some memory and be orders of magnitude slower than the univariate case. I only have a two dimensional case, so I was hoping to…

---

## [Scalar indexing is disallowed](https://discourse.julialang.org/t/scalar-indexing-is-disallowed/102808)

<div class="topic-metadata">

**Author:** [@A\_M](https://discourse.julialang.org/u/A_M)\
**Replies:** 4\
**Last updated:** [August 15, 2023, 12:50pm UTC](https://discourse.julialang.org/t/scalar-indexing-is-disallowed/102808 "2023-08-15T12:50:58Z")

</div>

Can you tell me why I am getting it? ERROR: LoadError: Scalar indexing is disallowed. Invocation of getindex resulted in scalar indexing of a GPU array. This is typically caused by calling an iterating implementation of…

---

## [AMPL to Julia](https://discourse.julialang.org/t/ampl-to-julia/102800)

<div class="topic-metadata">

**Author:** [@Julianewbie](https://discourse.julialang.org/u/Julianewbie)\
**Replies:** 3\
**Last updated:** [August 15, 2023, 10:30am UTC](https://discourse.julialang.org/t/ampl-to-julia/102800 "2023-08-15T10:30:30Z")

</div>

Hello, I am trying to convert an AMPL file to Julia and I dont know how to get started I have the following expressions that I need help with so I can use them as a reference to get started, the second one should be a f…

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

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