# Latest

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

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

**Page:** 1074

---

## [Speeding up contraction mapping](https://discourse.julialang.org/t/speeding-up-contraction-mapping/79134)

<div class="topic-metadata">

**Author:** [@rubaiyat](https://discourse.julialang.org/u/rubaiyat)\
**Replies:** 7\
**Last updated:** [April 8, 2022, 12:27am UTC](https://discourse.julialang.org/t/speeding-up-contraction-mapping/79134 "2022-04-08T00:27:21Z")

</div>

Hello everyone, I’m implementing the demand estimation for Berry-Levinsohn-Pakes (1995) for my research, and it would be great to get some help on this. While my code works, it takes a while, and so I was looking to spe…

---

## [Error when I use the function distribute(array) from the libray DistributedArrays](https://discourse.julialang.org/t/error-when-i-use-the-function-distribute-array-from-the-libray-distributedarrays/16015)

<div class="topic-metadata">

**Author:** [@dsHitman](https://discourse.julialang.org/u/dsHitman)\
**Replies:** 3\
**Last updated:** [April 7, 2022, 9:57pm UTC](https://discourse.julialang.org/t/error-when-i-use-the-function-distribute-array-from-the-libray-distributedarrays/16015 "2022-04-07T21:57:05Z")

</div>

When I create an array and after I use the distribute() function from the Distributed Arrays library, I get this error: ERROR: On worker 2: KeyError: key DistributedArrays \[aaf54ef3-cdf8-58ed-94cc-d582ad619b94\] not fou…

---

## [How do I write @variable(z=x\[1\]+x\[2\])?](https://discourse.julialang.org/t/how-do-i-write-variable-z-x-1-x-2/79149)

<div class="topic-metadata">

**Author:** [@castlemas](https://discourse.julialang.org/u/castlemas)\
**Replies:** 5\
**Last updated:** [April 7, 2022, 9:32pm UTC](https://discourse.julialang.org/t/how-do-i-write-variable-z-x-1-x-2/79149 "2022-04-07T21:32:38Z")

</div>

Hi, I am trying to solve a min-max optimisation problem that requires me to add in a constraint How do I assign a constraint such that a variable equals to another variable?

---

## [Differentiation of expressions involving arrays](https://discourse.julialang.org/t/differentiation-of-expressions-involving-arrays/78826)

<div class="topic-metadata">

**Author:** [@natema](https://discourse.julialang.org/u/natema)\
**Replies:** 4\
**Last updated:** [April 7, 2022, 8:42pm UTC](https://discourse.julialang.org/t/differentiation-of-expressions-involving-arrays/78826 "2022-04-07T20:42:46Z")

</div>

Hi. I’m a ModellingToolkit newbie (and DE in general). I wrote some code last December which now throws the error Differentiation of expressions involving arrays and array variables is not yet supported. I saw that rai…

---

## [Gurobi 9.5 MemLimit usage](https://discourse.julialang.org/t/gurobi-9-5-memlimit-usage/79045)

<div class="topic-metadata">

**Author:** [@max](https://discourse.julialang.org/u/max)\
**Replies:** 6\
**Last updated:** [April 7, 2022, 8:31pm UTC](https://discourse.julialang.org/t/gurobi-9-5-memlimit-usage/79045 "2022-04-07T20:31:03Z")

</div>

Hello everyone, i am struggeling with the usage of the MemLimit (https://www.gurobi.com/documentation/9.5/refman/memlimit.html) option which was newly introduced in Gurobi 9.5. Gurobi should throw an error when exceedi…

---

## [First steps into Machine Learning?](https://discourse.julialang.org/t/first-steps-into-machine-learning/79153)

<div class="topic-metadata">

**Author:** [@marianoarnaiz](https://discourse.julialang.org/u/marianoarnaiz)\
**Replies:** 4\
**Last updated:** [April 7, 2022, 8:25pm UTC](https://discourse.julialang.org/t/first-steps-into-machine-learning/79153 "2022-04-07T20:25:38Z")

</div>

Hi everyone!. So … I am a ML newbie (I actually have just finished reading Jeremy Watt’s book and was able to understand some of it). Now I would like to do some computational testing, for example I have a task I need t…

---

## [Is there a way to combine 4+ channels in a single image? (Images.jl)](https://discourse.julialang.org/t/is-there-a-way-to-combine-4-channels-in-a-single-image-images-jl/17249)

<div class="topic-metadata">

**Author:** [@wrgr](https://discourse.julialang.org/u/wrgr)\
**Replies:** 7\
**Last updated:** [April 7, 2022, 6:53pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-combine-4-channels-in-a-single-image-images-jl/17249 "2022-04-07T18:53:30Z")

</div>

Input: 4-5 intensity channels, represented as 2D arrays with elements in \[0, 1\]. Problem: combine and display them in a single image, giving each channel a specific color, e.g. yellow, red, green, blue for 4 channels, u…

---

## [Finding eigenvalues with the smallest magnitude using eigs](https://discourse.julialang.org/t/finding-eigenvalues-with-the-smallest-magnitude-using-eigs/79130)

<div class="topic-metadata">

**Author:** [@ahmed](https://discourse.julialang.org/u/ahmed)\
**Replies:** 9\
**Last updated:** [April 7, 2022, 5:05pm UTC](https://discourse.julialang.org/t/finding-eigenvalues-with-the-smallest-magnitude-using-eigs/79130 "2022-04-07T17:05:59Z")

</div>

I have a large Hermitian sparse matrix, and I’d like to get a few of the eigenvalues with the smallest magnitude. I’m using the “eigs” function in Arpack however I get this error message: “ZeroPivotException: factorizat…

---

## [Getting the boundary of fonts as points](https://discourse.julialang.org/t/getting-the-boundary-of-fonts-as-points/79114)

<div class="topic-metadata">

**Author:** [@lazarusA](https://discourse.julialang.org/u/lazarusA)\
**Replies:** 8\
**Last updated:** [April 7, 2022, 4:29pm UTC](https://discourse.julialang.org/t/getting-the-boundary-of-fonts-as-points/79114 "2022-04-07T16:29:59Z")

</div>

I want to plot letters/fonts as curves, hence access to a more point-like representation. I’m looking for a way to get a point\[all pixels\] or curve\[boundary\] representation of fonts maybe normalised within a unit box, n…

---

## [Closing a TCP stream (behavior difference from NodeJS?)](https://discourse.julialang.org/t/closing-a-tcp-stream-behavior-difference-from-nodejs/79140)

<div class="topic-metadata">

**Author:** [@guille](https://discourse.julialang.org/u/guille)\
**Replies:** 2\
**Last updated:** [April 7, 2022, 4:09pm UTC](https://discourse.julialang.org/t/closing-a-tcp-stream-behavior-difference-from-nodejs/79140 "2022-04-07T16:09:20Z")

</div>

Heya! I had a (hopefully) simple question regarding the behavior of close on a TCP stream. We have some server which is taking inputs from a client and the spec requires us drop a connection if the client sends some mal…

---

## [Current OpenBLAS Versions (January 2022) do not support Intel gen 11 performantly?](https://discourse.julialang.org/t/current-openblas-versions-january-2022-do-not-support-intel-gen-11-performantly/75104)

<div class="topic-metadata">

**Author:** [@photor](https://discourse.julialang.org/u/photor)\
**Replies:** 50\
**Last updated:** [April 7, 2022, 2:35pm UTC](https://discourse.julialang.org/t/current-openblas-versions-january-2022-do-not-support-intel-gen-11-performantly/75104 "2022-04-07T14:35:27Z")

</div>

julia\> BLAS.get\_config() LinearAlgebra.BLAS.LBTConfig Libraries: └ \[ILP64\] libopenblas64\_.dll julia\> A=randn(10000,10000); julia\> @elapsed A\*A 31.8050192 julia\> @elapsed A\*A 32.776766 julia\> using MKL julia\> @elapse…

---

## [How to define a macro that evaluates in local scope](https://discourse.julialang.org/t/how-to-define-a-macro-that-evaluates-in-local-scope/79173)

<div class="topic-metadata">

**Author:** [@jpdoane](https://discourse.julialang.org/u/jpdoane)\
**Replies:** 2\
**Last updated:** [April 7, 2022, 2:32pm UTC](https://discourse.julialang.org/t/how-to-define-a-macro-that-evaluates-in-local-scope/79173 "2022-04-07T14:32:51Z")

</div>

I am trying to write a custom benchmarking macro, but as a first step I cannot seem to write even a trivial macro that transparently executes an arbitrary expression. Specifically if the expression is a variable assign…

---

## [Dynamical system identification - the julian way?](https://discourse.julialang.org/t/dynamical-system-identification-the-julian-way/79148)

<div class="topic-metadata">

**Author:** [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Replies:** 15\
**Last updated:** [April 7, 2022, 2:19pm UTC](https://discourse.julialang.org/t/dynamical-system-identification-the-julian-way/79148 "2022-04-07T14:19:43Z")

</div>

Hello all ! I’m working on a structural dynamics identification topic involving the identification of a model coefficients for frequency response functions (or transfer function if your prefer). The model is the follow…

---

## [How to handle vector like in numpy?](https://discourse.julialang.org/t/how-to-handle-vector-like-in-numpy/79167)

<div class="topic-metadata">

**Author:** [@egor](https://discourse.julialang.org/u/egor)\
**Replies:** 5\
**Last updated:** [April 7, 2022, 1:56pm UTC](https://discourse.julialang.org/t/how-to-handle-vector-like-in-numpy/79167 "2022-04-07T13:56:31Z")

</div>

Hello everyone, in python, I often use this construction from numpy to select the necessary elements of an array: counter = (array \>= threshold).sum() Is there something similar for vectors in julia or is it just to us…

---

## [Methods of a function that has both optional positional argument and keyword argument](https://discourse.julialang.org/t/methods-of-a-function-that-has-both-optional-positional-argument-and-keyword-argument/78869)

<div class="topic-metadata">

**Author:** [@frankwswang](https://discourse.julialang.org/u/frankwswang)\
**Replies:** 6\
**Last updated:** [April 7, 2022, 1:45pm UTC](https://discourse.julialang.org/t/methods-of-a-function-that-has-both-optional-positional-argument-and-keyword-argument/78869 "2022-04-07T13:45:41Z")

</div>

I know keyword arguments don’t invoke multiple dispatch. So methods with the same positional arguments except keyword arguments can overload each other: julia\> f(a) = a f (generic function with 1 method) julia\> methods…

---

## [Reduce the allocation to zero](https://discourse.julialang.org/t/reduce-the-allocation-to-zero/79160)

<div class="topic-metadata">

**Author:** [@xspeng](https://discourse.julialang.org/u/xspeng)\
**Replies:** 7\
**Last updated:** [April 7, 2022, 1:07pm UTC](https://discourse.julialang.org/t/reduce-the-allocation-to-zero/79160 "2022-04-07T13:07:29Z")

</div>

I have a question about whether it’s possible to reduce the following simple case allocation to zero a = rand(5) b = rand(5) c = rand(5) d = rand(5) N = rand(8) @time acl = sum(a) \* (N\[1\] - N\[5\]) + sum(b) \* (N\[2\] - N\[6…

---

## [How to get a functions keyword argument types?](https://discourse.julialang.org/t/how-to-get-a-functions-keyword-argument-types/78781)

<div class="topic-metadata">

**Author:** [@onetonfoot](https://discourse.julialang.org/u/onetonfoot)\
**Replies:** 1\
**Last updated:** [April 7, 2022, 12:59pm UTC](https://discourse.julialang.org/t/how-to-get-a-functions-keyword-argument-types/78781 "2022-04-07T12:59:16Z")

</div>

How can I get the types for the keyword arguments of a function? For example, with normal arguments I can use f(x::Int) = x methods(f)\[1\].sig #Tuple{typeof(f), Int64} I’m looking for something along the lines of g(x::…

---

## [Bind UDP socket to interface](https://discourse.julialang.org/t/bind-udp-socket-to-interface/79164)

<div class="topic-metadata">

**Author:** [@Tine](https://discourse.julialang.org/u/Tine)\
**Replies:** 0\
**Last updated:** [April 7, 2022, 12:42pm UTC](https://discourse.julialang.org/t/bind-udp-socket-to-interface/79164 "2022-04-07T12:42:06Z")

</div>

Is it possible to bind a UDP socket to a specific ethernet interface? I looked at the option to call the C-function setsockopt() from Julia using ccall, but how do I do this, if this is at all possible? I want somethin…

---

## [How to extract a differential operator from an expression involving symbolic derivatives (using Symbolics.jl)?](https://discourse.julialang.org/t/how-to-extract-a-differential-operator-from-an-expression-involving-symbolic-derivatives-using-symbolics-jl/76449)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 6\
**Last updated:** [April 7, 2022, 12:04pm UTC](https://discourse.julialang.org/t/how-to-extract-a-differential-operator-from-an-expression-involving-symbolic-derivatives-using-symbolics-jl/76449 "2022-04-07T12:04:34Z")

</div>

Suppose I have the following operation julia\> @variables t x(t) 2-element Vector{Num}: t x(t) julia\> Dt = Differential(t) (::Differential) (generic function with 2 methods) julia\> ex = expand\_derivatives(Dt(t^2\*x…

---

## [Is there a shortcut to construct derivatives of a product using Symbolics?](https://discourse.julialang.org/t/is-there-a-shortcut-to-construct-derivatives-of-a-product-using-symbolics/79144)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 1\
**Last updated:** [April 7, 2022, 11:47am UTC](https://discourse.julialang.org/t/is-there-a-shortcut-to-construct-derivatives-of-a-product-using-symbolics/79144 "2022-04-07T11:47:53Z")

</div>

This is a rather basic question, as I’ve just started using Symbolics.jl and couldn’t find this in the docs after a brief glance. What I want to do is evaluate f -\> (d/dx)(x \* f). I have figured out one way to achieve th…

---

## [Plot one point with a label](https://discourse.julialang.org/t/plot-one-point-with-a-label/79138)

<div class="topic-metadata">

**Author:** [@Katamari](https://discourse.julialang.org/u/Katamari)\
**Replies:** 3\
**Last updated:** [April 7, 2022, 9:50am UTC](https://discourse.julialang.org/t/plot-one-point-with-a-label/79138 "2022-04-07T09:50:08Z")

</div>

I would like to plot labeled points. The code I wrote to try it out is below. using CairoMakie function point(x; label=L"%$x") scatter!((x, 0);color=:black) text!(label, position=(x-0.05, 0.1)) end fig, ax=lines…

---

## [JuliaUserGroupMunich: Fall-in-love-with-julia on JuliaStats](https://discourse.julialang.org/t/juliausergroupmunich-fall-in-love-with-julia-on-juliastats/78393)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 4\
**Last updated:** [April 7, 2022, 9:29am UTC](https://discourse.julialang.org/t/juliausergroupmunich-fall-in-love-with-julia-on-juliastats/78393 "2022-04-07T09:29:33Z")

</div>

Join us on :spiral\_calendar: Monday 04. April 2022 :clock630: 18:30 CET organized via meetup Fall in love with Julia: Statistics & co with JuliaStats & StatsKit.jl ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Hi all, this is an in…

---

## [Inexplicable pause in Julia execution](https://discourse.julialang.org/t/inexplicable-pause-in-julia-execution/79076)

<div class="topic-metadata">

**Author:** [@Jake](https://discourse.julialang.org/u/Jake)\
**Replies:** 4\
**Last updated:** [April 7, 2022, 8:06am UTC](https://discourse.julialang.org/t/inexplicable-pause-in-julia-execution/79076 "2022-04-07T08:06:06Z")

</div>

I have an application that checks for files placed in a certain directory and then processes the files and waits for the next file. Yesterday we fixed a bug and set the program to work again. This morning when I checke…

---

## [Reducing getindex allocation \[edit: when using an array as index\]](https://discourse.julialang.org/t/reducing-getindex-allocation-edit-when-using-an-array-as-index/79116)

<div class="topic-metadata">

**Author:** [@user\_231578](https://discourse.julialang.org/u/user_231578)\
**Replies:** 17\
**Last updated:** [April 7, 2022, 7:54am UTC](https://discourse.julialang.org/t/reducing-getindex-allocation-edit-when-using-an-array-as-index/79116 "2022-04-07T07:54:33Z")

</div>

I need to access a matrix millions of times, and I noticed that most of the allocations of my code come exactly from this. My code is similar to the following example const A = rand(10,10) function get\_number(idx) @inb…

---

## [Incomplete page rendering](https://discourse.julialang.org/t/incomplete-page-rendering/79027)

<div class="topic-metadata">

**Author:** [@paradoxical-rhapsody](https://discourse.julialang.org/u/paradoxical-rhapsody)\
**Replies:** 1\
**Last updated:** [April 7, 2022, 7:25am UTC](https://discourse.julialang.org/t/incomplete-page-rendering/79027 "2022-04-07T07:25:56Z")

</div>

Benifiting from the convenint pkg Franklin, I created a personal site to collect daily notes. In the site, a mysite/notes/index.md is used to list the note items. The full content of mysite/notes/index.md is presented as…

---

## [Is there a direct link function for chemical process simulator like Aspen plus in Julia like in Matlab or python through COM technology?](https://discourse.julialang.org/t/is-there-a-direct-link-function-for-chemical-process-simulator-like-aspen-plus-in-julia-like-in-matlab-or-python-through-com-technology/79133)

<div class="topic-metadata">

**Author:** [@JackaChou](https://discourse.julialang.org/u/JackaChou)\
**Replies:** 4\
**Last updated:** [April 7, 2022, 6:55am UTC](https://discourse.julialang.org/t/is-there-a-direct-link-function-for-chemical-process-simulator-like-aspen-plus-in-julia-like-in-matlab-or-python-through-com-technology/79133 "2022-04-07T06:55:50Z")

</div>

Something like Aspen Plus - Matlab Link - File Exchange - MATLAB Central

---

## [Disable vscode blue wave warning "The included file can not be found."](https://discourse.julialang.org/t/disable-vscode-blue-wave-warning-the-included-file-can-not-be-found/79087)

<div class="topic-metadata">

**Author:** [@Himbeersternchen](https://discourse.julialang.org/u/Himbeersternchen)\
**Replies:** 2\
**Last updated:** [April 6, 2022, 1:49pm UTC](https://discourse.julialang.org/t/disable-vscode-blue-wave-warning-the-included-file-can-not-be-found/79087 "2022-04-06T13:49:00Z")

</div>

Hi Guys, i have in a julia scripts main.jl the code line @everywhere include(“test/test\_functions.jl”) and i ran it in REPL or terminal, it’s no problem (this project must be ran in the project folder not in the test …

---

## [How to determine conditions of bistability](https://discourse.julialang.org/t/how-to-determine-conditions-of-bistability/78431)

<div class="topic-metadata">

**Author:** [@Dragolonth](https://discourse.julialang.org/u/Dragolonth)\
**Replies:** 4\
**Last updated:** [April 7, 2022, 6:08am UTC](https://discourse.julialang.org/t/how-to-determine-conditions-of-bistability/78431 "2022-04-07T06:08:28Z")

</div>

Hello everyone! I’m new to Julia and would consider myself a beginner to programming in general. Currently, I am using Catalyst.jl to define a system of ODEs as a reaction network. I have the parameters and initial condi…

---

## [Documenting a parametric callable struct](https://discourse.julialang.org/t/documenting-a-parametric-callable-struct/79135)

<div class="topic-metadata">

**Author:** [@Jae-Mo\_Lihm](https://discourse.julialang.org/u/Jae-Mo_Lihm)\
**Replies:** 2\
**Last updated:** [April 7, 2022, 5:41am UTC](https://discourse.julialang.org/t/documenting-a-parametric-callable-struct/79135 "2022-04-07T05:41:19Z")

</div>

I want to document a callable, parametric struct, but the docstring for the function does not show up. This question is similar to Documenting a functor / callable struct, but the fix (https://github.com/JuliaLang/julia…

---

## [Training FLUX models with larger datasets](https://discourse.julialang.org/t/training-flux-models-with-larger-datasets/79057)

<div class="topic-metadata">

**Author:** [@lgmendes](https://discourse.julialang.org/u/lgmendes)\
**Replies:** 4\
**Last updated:** [April 7, 2022, 1:45am UTC](https://discourse.julialang.org/t/training-flux-models-with-larger-datasets/79057 "2022-04-07T01:45:44Z")

</div>

Hi, I’m trying to train a FLUX model (ResNet50) with a medium-size dataset (~ 30K images (512X512X3)) on a computer with 128GB of RAM and Three NVIDIA GeForce GTX 1080 Ti. I’m loading the data with Dataloader using a B…

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

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