# Latest

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

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

**Page:** 864

---

## [Weird syntax error](https://discourse.julialang.org/t/weird-syntax-error/89591)

<div class="topic-metadata">

**Author:** [@pjssilva](https://discourse.julialang.org/u/pjssilva)\
**Replies:** 10\
**Last updated:** [November 16, 2022, 5:58am UTC](https://discourse.julialang.org/t/weird-syntax-error/89591 "2022-11-16T05:58:12Z")

</div>

The code below fails with a syntax error that seems related to the creation of the anonymous function. I don’t see why it is a syntax error. Can anyone explain it? let if 0 == 0 1 elseif 0 == 0 || !all(x…

---

## [Differences between NLsolve and Optim in solving system of equations](https://discourse.julialang.org/t/differences-between-nlsolve-and-optim-in-solving-system-of-equations/60467)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 24\
**Last updated:** [November 16, 2022, 4:04am UTC](https://discourse.julialang.org/t/differences-between-nlsolve-and-optim-in-solving-system-of-equations/60467 "2022-11-16T04:04:46Z")

</div>

I am solving a system of equations using 2 methods. Solving it “directly” with NLsolve, and solving it by minimizing the norm of the residuals of the system. Here’s an example: using NLsolve using Optim using LinearAlge…

---

## [AbstractGraph interface assumes a continous set of vertex ids? Alternative Interface?](https://discourse.julialang.org/t/abstractgraph-interface-assumes-a-continous-set-of-vertex-ids-alternative-interface/90268)

<div class="topic-metadata">

**Author:** [@Eulertin](https://discourse.julialang.org/u/Eulertin)\
**Replies:** 3\
**Last updated:** [November 16, 2022, 1:51am UTC](https://discourse.julialang.org/t/abstractgraph-interface-assumes-a-continous-set-of-vertex-ids-alternative-interface/90268 "2022-11-16T01:51:54Z")

</div>

I’ve implemented a custom Graph representation and wanted to use the functionality of the Graphs package, so I’ve implemented the AbstractGraph interface as explained in the packages manual here: https://juliagraphs.org…

---

## [Setindex! issue with DataFrame saved as Arrow file](https://discourse.julialang.org/t/setindex-issue-with-dataframe-saved-as-arrow-file/90307)

<div class="topic-metadata">

**Author:** [@alex-s-gardner](https://discourse.julialang.org/u/alex-s-gardner)\
**Replies:** 9\
**Last updated:** [November 16, 2022, 1:03am UTC](https://discourse.julialang.org/t/setindex-issue-with-dataframe-saved-as-arrow-file/90307 "2022-11-16T01:03:23Z")

</div>

Working with a DataFrame saved as an Arrow file: fn = download("https://www.dropbox.com/s/322g26p3apdeqpf/granules.remote?dl=0") Loading in the file as a df g = DataFrame(Arrow.Table(fn)) Copy the DataFrame g0 = cop…

---

## [SimpleATsit5?](https://discourse.julialang.org/t/simpleatsit5/90318)

<div class="topic-metadata">

**Author:** [@PeterSimon](https://discourse.julialang.org/u/PeterSimon)\
**Replies:** 2\
**Last updated:** [November 15, 2022, 11:27pm UTC](https://discourse.julialang.org/t/simpleatsit5/90318 "2022-11-15T23:27:25Z")

</div>

I’m just getting started with the DifferentialEquations universe. In the first paragraph after this heading in the documentation, it is stated that SimpleATsit5 is a fast, viable solver for small, non-stiff ODEs. I hav…

---

## [\[ANN\] Braket.jl: an experimental Julia implementation of the Amazon Braket SDK](https://discourse.julialang.org/t/ann-braket-jl-an-experimental-julia-implementation-of-the-amazon-braket-sdk/90311)

<div class="topic-metadata">

**Author:** [@kslimes](https://discourse.julialang.org/u/kslimes)\
**Replies:** 2\
**Last updated:** [November 15, 2022, 11:59pm UTC](https://discourse.julialang.org/t/ann-braket-jl-an-experimental-julia-implementation-of-the-amazon-braket-sdk/90311 "2022-11-15T23:59:57Z")

</div>

We’re excited to announce the release of Braket.jl, an experimental ground-up rewrite of the Amazon Braket Python SDK allowing Julia users and developers to work with Amazon Braket and quantum computing in their preferre…

---

## [Moving constants to compile-time "lookup" functions with Val](https://discourse.julialang.org/t/moving-constants-to-compile-time-lookup-functions-with-val/90314)

<div class="topic-metadata">

**Author:** [@jacobusmmsmit](https://discourse.julialang.org/u/jacobusmmsmit)\
**Replies:** 5\
**Last updated:** [November 15, 2022, 11:45pm UTC](https://discourse.julialang.org/t/moving-constants-to-compile-time-lookup-functions-with-val/90314 "2022-11-15T23:45:09Z")

</div>

Hi everyone, This may be my most ??? question yet. I read this blog about using Val to use arguments at compile time, and I want to take this a step further by using Val to elide a long string of const declarations. My…

---

## [Lux.jl implementation of denoising diffusion model](https://discourse.julialang.org/t/lux-jl-implementation-of-denoising-diffusion-model/90275)

<div class="topic-metadata">

**Author:** [@Keisuke\_Yanagi](https://discourse.julialang.org/u/Keisuke_Yanagi)\
**Replies:** 2\
**Last updated:** [November 15, 2022, 11:05pm UTC](https://discourse.julialang.org/t/lux-jl-implementation-of-denoising-diffusion-model/90275 "2022-11-15T23:05:30Z")

</div>

Hi Using Lux.jl, I’ve implemented denoising diffusion implicit model for image generation from noises. Question: is there any place for me to contribute to enhance the Lux.jl examples? (Just making PR on the repo?)

---

## [Arduino with Julia](https://discourse.julialang.org/t/arduino-with-julia/75465)

<div class="topic-metadata">

**Author:** [@davibarreira](https://discourse.julialang.org/u/davibarreira)\
**Replies:** 2\
**Last updated:** [November 15, 2022, 10:51pm UTC](https://discourse.julialang.org/t/arduino-with-julia/75465 "2022-11-15T22:51:49Z")

</div>

I just got an Arduino for my birthday, and I was wondering if there were any tutorials out-there on how to use Julia with Arduino :slight\_smile: I saw @yakir12 has a discussion on the issue, but there is not really a tu…

---

## [Can't compile sysimage in VSCode because of UndefRefError](https://discourse.julialang.org/t/cant-compile-sysimage-in-vscode-because-of-undefreferror/90312)

<div class="topic-metadata">

**Author:** [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Replies:** 0\
**Last updated:** [November 15, 2022, 7:54pm UTC](https://discourse.julialang.org/t/cant-compile-sysimage-in-vscode-because-of-undefreferror/90312 "2022-11-15T19:54:27Z")

</div>

I am trying to compile a sysimage using the VSCode Task:Build Task feature. This is for the OpticSim.jl package; it returns an UndefRefError, which I’ve never seen before. The error appears to occur somewhere in the GR p…

---

## [Repeat CuArray (subtract 3 Vector from every row of nx3 matrix)](https://discourse.julialang.org/t/repeat-cuarray-subtract-3-vector-from-every-row-of-nx3-matrix/90291)

<div class="topic-metadata">

**Author:** [@LeN3rd](https://discourse.julialang.org/u/LeN3rd)\
**Replies:** 3\
**Last updated:** [November 15, 2022, 8:36pm UTC](https://discourse.julialang.org/t/repeat-cuarray-subtract-3-vector-from-every-row-of-nx3-matrix/90291 "2022-11-15T20:36:22Z")

</div>

How can i repeat a CuArray in a fast way? I have a 3 vector that is supposed to be subtracted from every row in a n x 3 matrix. The CPU code just transposes and repeats it, but this takes up to 3 seconds on GPU and takes…

---

## [Initialize Lux.jl NN parameters according to Lux.glorot\_normal](https://discourse.julialang.org/t/initialize-lux-jl-nn-parameters-according-to-lux-glorot-normal/90293)

<div class="topic-metadata">

**Author:** [@MilesCB](https://discourse.julialang.org/u/MilesCB)\
**Replies:** 1\
**Last updated:** [November 15, 2022, 8:10pm UTC](https://discourse.julialang.org/t/initialize-lux-jl-nn-parameters-according-to-lux-glorot-normal/90293 "2022-11-15T20:10:26Z")

</div>

Hi all, I would like to initialize the parameters of a Lux.jl neural network with something other than a random distribution; for instance with Lux.glorot\_normal. I am using this network with NeuralPDE.jl with the follo…

---

## [R2r is surprisingly slower than complex fft](https://discourse.julialang.org/t/r2r-is-surprisingly-slower-than-complex-fft/90018)

<div class="topic-metadata">

**Author:** [@photor](https://discourse.julialang.org/u/photor)\
**Replies:** 7\
**Last updated:** [November 15, 2022, 7:43pm UTC](https://discourse.julialang.org/t/r2r-is-surprisingly-slower-than-complex-fft/90018 "2022-11-15T19:43:01Z")

</div>

const m=60 x=randn(m,m,m) y=deepcopy(x) p = FFTW.plan\_r2r(y,FFTW.R2HC,flags=FFTW.MEASURE) @btime mul!($y,$p,$x); gives the result 572.302 μs (138 allocations: 10.16 KiB) while const m=60 x=randn(ComplexF64,m,m,m) y…

---

## [How to efficiently develop in Julia?](https://discourse.julialang.org/t/how-to-efficiently-develop-in-julia/90157)

<div class="topic-metadata">

**Author:** [@cdawg](https://discourse.julialang.org/u/cdawg)\
**Replies:** 5\
**Last updated:** [November 15, 2022, 7:06pm UTC](https://discourse.julialang.org/t/how-to-efficiently-develop-in-julia/90157 "2022-11-15T19:06:30Z")

</div>

@lmiq mentioned in the teaching with Julia thread that it might be nice for the Julia webpage to host How to efficiently develop in Julia tutorial, for Julia newbies. Well :sweat\_smile: I’ve been using Julia for year…

---

## [Operations on ComposedFunctions using Symbolics.jl and in Julia in general](https://discourse.julialang.org/t/operations-on-composedfunctions-using-symbolics-jl-and-in-julia-in-general/90309)

<div class="topic-metadata">

**Author:** [@MattM](https://discourse.julialang.org/u/MattM)\
**Replies:** 0\
**Last updated:** [November 15, 2022, 6:31pm UTC](https://discourse.julialang.org/t/operations-on-composedfunctions-using-symbolics-jl-and-in-julia-in-general/90309 "2022-11-15T18:31:56Z")

</div>

Hello, I am using Symbolics.jl for a project, and would like to play around with the Operator structure. In particular, I would like to build operators such as a Lie operator, defined as :f: = \\frac{\\partial f}{\\parti…

---

## [POSIX Shared Memory and different behaviour on Linux/Mac](https://discourse.julialang.org/t/posix-shared-memory-and-different-behaviour-on-linux-mac/90304)

<div class="topic-metadata">

**Author:** [@ErikBuer](https://discourse.julialang.org/u/ErikBuer)\
**Replies:** 0\
**Last updated:** [November 15, 2022, 5:39pm UTC](https://discourse.julialang.org/t/posix-shared-memory-and-different-behaviour-on-linux-mac/90304 "2022-11-15T17:39:35Z")

</div>

Hi. First. I don’t know if this is the right place to ask, but I hope posting here might help others looking at shared memory for Julia in the future. I have attempted to share memory between C++ and Julia in order to …

---

## [Continuous callback does not work correctly with Ensemble GPUArray()](https://discourse.julialang.org/t/continuous-callback-does-not-work-correctly-with-ensemble-gpuarray/90254)

<div class="topic-metadata">

**Author:** [@mabrudsky](https://discourse.julialang.org/u/mabrudsky)\
**Replies:** 0\
**Last updated:** [November 14, 2022, 6:43pm UTC](https://discourse.julialang.org/t/continuous-callback-does-not-work-correctly-with-ensemble-gpuarray/90254 "2022-11-14T18:43:12Z")

</div>

Hello, I am solving a central potential problem with EnsembleGPUArray() for multiple initial conditions, when I add the ContinuousCallback the first 800 trajectories ignore the affect!(integrator) and the last 200 do the…

---

## [Varinfo() not working in Jupyter Notebook in VSCode](https://discourse.julialang.org/t/varinfo-not-working-in-jupyter-notebook-in-vscode/90300)

<div class="topic-metadata">

**Author:** [@daler6](https://discourse.julialang.org/u/daler6)\
**Replies:** 0\
**Last updated:** [November 15, 2022, 4:30pm UTC](https://discourse.julialang.org/t/varinfo-not-working-in-jupyter-notebook-in-vscode/90300 "2022-11-15T16:30:15Z")

</div>

When I am running a JupyterNotebook using Julia in VS Code, I get the following error when I use the varinfo() function: ParseError: KaTeX parse error: No such environment: tabular at position 7: \\begin{̲t̲a̲b̲u̲l̲a̲r̲}…

---

## [Using integrator time derivative for implementing residual viscosity with DiffEq.jl](https://discourse.julialang.org/t/using-integrator-time-derivative-for-implementing-residual-viscosity-with-diffeq-jl/90216)

<div class="topic-metadata">

**Author:** [@jarias9](https://discourse.julialang.org/u/jarias9)\
**Replies:** 2\
**Last updated:** [November 15, 2022, 3:39pm UTC](https://discourse.julialang.org/t/using-integrator-time-derivative-for-implementing-residual-viscosity-with-diffeq-jl/90216 "2022-11-15T15:39:38Z")

</div>

Hello all, I have been trying to implement a concept known as residual viscosity to stabilize a fluid simulation inside of DiffEq.jl. In general, I would need access to the derivative of the integrator in order to do t…

---

## [MetaGraphs.jl PR pending](https://discourse.julialang.org/t/metagraphs-jl-pr-pending/90101)

<div class="topic-metadata">

**Author:** [@filchristou](https://discourse.julialang.org/u/filchristou)\
**Replies:** 1\
**Last updated:** [November 15, 2022, 3:32pm UTC](https://discourse.julialang.org/t/metagraphs-jl-pr-pending/90101 "2022-11-15T15:32:43Z")

</div>

Could someone please have a look at my PR from March ? I am developing a side package that may be soon published and I wouldn’t want to have a dependency pointing to my fork… Sorry for bringing my request here. I’ve a…

---

## [How to build a network of networks graph (i.e. how to connect modules)?](https://discourse.julialang.org/t/how-to-build-a-network-of-networks-graph-i-e-how-to-connect-modules/88902)

<div class="topic-metadata">

**Author:** [@KalelR](https://discourse.julialang.org/u/KalelR)\
**Replies:** 3\
**Last updated:** [November 15, 2022, 3:30pm UTC](https://discourse.julialang.org/t/how-to-build-a-network-of-networks-graph-i-e-how-to-connect-modules/88902 "2022-11-15T15:30:08Z")

</div>

Hello I am new to using Graphs.jl and I would like to know a good way to build a graph for a network of networks. My specific application is to build a graph representing something like what is shown in the figure: 4…

---

## [How to get number of real levels of InteractionTerm from fitted model (GLM) via StatsModels?](https://discourse.julialang.org/t/how-to-get-number-of-real-levels-of-interactionterm-from-fitted-model-glm-via-statsmodels/89846)

<div class="topic-metadata">

**Author:** [@PharmCat](https://discourse.julialang.org/u/PharmCat)\
**Replies:** 10\
**Last updated:** [November 15, 2022, 2:59pm UTC](https://discourse.julialang.org/t/how-to-get-number-of-real-levels-of-interactionterm-from-fitted-model-glm-via-statsmodels/89846 "2022-11-15T14:59:06Z")

</div>

I want to get a number of levels of InteractionTerm (not all combination, but real exist) from the fitted model. I can’t get it as the number of columns in model-matrix because it can be made with DummyCoding or FulDummy…

---

## [Understanding "rejecting cache file …"](https://discourse.julialang.org/t/understanding-rejecting-cache-file/55127)

<div class="topic-metadata">

**Author:** [@dapz](https://discourse.julialang.org/u/dapz)\
**Replies:** 4\
**Last updated:** [November 15, 2022, 2:57pm UTC](https://discourse.julialang.org/t/understanding-rejecting-cache-file/55127 "2022-11-15T14:57:35Z")

</div>

Hi, I have a package that I develop locally and which has a few dependencies, and I don’t understand why I get so many debug messages “rejecting cache file …” when loading it (which, I guess, also increases the loading t…

---

## [Function to set default parameters and easily update them](https://discourse.julialang.org/t/function-to-set-default-parameters-and-easily-update-them/90289)

<div class="topic-metadata">

**Author:** [@Marca85](https://discourse.julialang.org/u/Marca85)\
**Replies:** 2\
**Last updated:** [November 15, 2022, 2:27pm UTC](https://discourse.julialang.org/t/function-to-set-default-parameters-and-easily-update-them/90289 "2022-11-15T14:27:05Z")

</div>

I am trying to understand the most Julia way to create a function that specifies some default parameters that can also be modified by inputing external parameters. pars = default\_pars() would return all the default para…

---

## [An efficient way to compute the average length of streaks of a given number](https://discourse.julialang.org/t/an-efficient-way-to-compute-the-average-length-of-streaks-of-a-given-number/90286)

<div class="topic-metadata">

**Author:** [@Nash](https://discourse.julialang.org/u/Nash)\
**Replies:** 4\
**Last updated:** [November 15, 2022, 2:05pm UTC](https://discourse.julialang.org/t/an-efficient-way-to-compute-the-average-length-of-streaks-of-a-given-number/90286 "2022-11-15T14:05:59Z")

</div>

Suppose I have a large vector of integers ranging from 1 to 5. Now suppose I want to compute the average length of streaks of say, the number 5, where a single appearance of “5” before a different number appears, is coun…

---

## [Import from a file in current directory using PyCall](https://discourse.julialang.org/t/import-from-a-file-in-current-directory-using-pycall/90287)

<div class="topic-metadata">

**Author:** [@nvenkov1](https://discourse.julialang.org/u/nvenkov1)\
**Replies:** 2\
**Last updated:** [November 15, 2022, 1:38pm UTC](https://discourse.julialang.org/t/import-from-a-file-in-current-directory-using-pycall/90287 "2022-11-15T13:38:26Z")

</div>

I run Julia from a folder which contains a Python file called GramSchmidt.py which I wish to import from using PyCall. I proceed as follows: using PyCall GramSchmidt = pyimport("GramSchmidt") I however get an error tha…

---

## [Solving sparse, linear equations?](https://discourse.julialang.org/t/solving-sparse-linear-equations/90238)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 10\
**Last updated:** [November 15, 2022, 12:09pm UTC](https://discourse.julialang.org/t/solving-sparse-linear-equations/90238 "2022-11-15T12:09:00Z")

</div>

I have a linear equation AA\*z = bb where AA is a full rank, sparse matrix : julia\> AA 650×650 SparseMatrixCSC{Float64, Int64} with 2280 stored entries: ... When I try to solve the equation, I get an error message: ju…

---

## [Can I index a DataFrame using a String key?](https://discourse.julialang.org/t/can-i-index-a-dataframe-using-a-string-key/90251)

<div class="topic-metadata">

**Author:** [@bertulli](https://discourse.julialang.org/u/bertulli)\
**Replies:** 7\
**Last updated:** [November 15, 2022, 10:39am UTC](https://discourse.julialang.org/t/can-i-index-a-dataframe-using-a-string-key/90251 "2022-11-15T10:39:59Z")

</div>

Hi all! So I’m writing some code where I need to access some properties of some machine register. I want to store both the value the register it’s initializated to and its binary weight. Using a DataFrame and the count\_…

---

## [Performance: Fast way to access numbers in Dataframes or alternatives](https://discourse.julialang.org/t/performance-fast-way-to-access-numbers-in-dataframes-or-alternatives/89884)

<div class="topic-metadata">

**Author:** [@pjuergens](https://discourse.julialang.org/u/pjuergens)\
**Replies:** 12\
**Last updated:** [November 15, 2022, 9:35am UTC](https://discourse.julialang.org/t/performance-fast-way-to-access-numbers-in-dataframes-or-alternatives/89884 "2022-11-15T09:35:43Z")

</div>

Hello together, I’m searching for a fast (or the fastest) way to access datapoints/numbers in a dataframes-like structure. I have 57 timeseries (columns) with 43800 datapoints (rows) each that are read in from a csv-fil…

---

## [Lagragian multipliers in JuMP](https://discourse.julialang.org/t/lagragian-multipliers-in-jump/90234)

<div class="topic-metadata">

**Author:** [@this\_josh](https://discourse.julialang.org/u/this_josh)\
**Replies:** 6\
**Last updated:** [November 15, 2022, 8:58am UTC](https://discourse.julialang.org/t/lagragian-multipliers-in-jump/90234 "2022-11-15T08:58:47Z")

</div>

I appreciate questions about Lagrange multipliers in Jump have been discussed before, here the sign change is described. However, I’m having trouble reproducing example 6.32 (page 163) in Nonlinear and mixed-integer opti…

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

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