# Latest

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

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

**Page:** 958

---

## [How to create columns in a loop](https://discourse.julialang.org/t/how-to-create-columns-in-a-loop/85519)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 6\
**Last updated:** [August 9, 2022, 8:02am UTC](https://discourse.julialang.org/t/how-to-create-columns-in-a-loop/85519 "2022-08-09T08:02:58Z")

</div>

I have the following code: using InMemoryDatasets # create a demo data set of CAN bus messages function demo\_data() n = 100000 time = 0.1:0.1:n\*0.1 addr = rand(Int16(0x101):Int16(0x12e), n) d1 = rand(UI…

---

## [REPL in multi window vscode dosen't work](https://discourse.julialang.org/t/repl-in-multi-window-vscode-dosent-work/85520)

<div class="topic-metadata">

**Author:** [@rmsmsgood](https://discourse.julialang.org/u/rmsmsgood)\
**Replies:** 1\
**Last updated:** [August 9, 2022, 8:02am UTC](https://discourse.julialang.org/t/repl-in-multi-window-vscode-dosent-work/85520 "2022-08-09T08:02:31Z")

</div>

I usually used vscode in 2 windows by duplicating workspace, but julia REPL dosen’t work(unfortunately i don’t know when the issue happened, it works abut 6 month ago, i guess…) Below is how to repro my issue. ↑ The…

---

## [Changing domain for Fourier](https://discourse.julialang.org/t/changing-domain-for-fourier/85331)

<div class="topic-metadata">

**Author:** [@andreasvarga](https://discourse.julialang.org/u/andreasvarga)\
**Replies:** 5\
**Last updated:** [August 9, 2022, 5:52am UTC](https://discourse.julialang.org/t/changing-domain-for-fourier/85331 "2022-08-09T05:52:02Z")

</div>

I am using ApproxFun.jl as basis to define and manipulate periodic matrices within the PeridicSystems.jl, a collection of tools dedicated for handling periodic systems. I consider ApproxFun.jl a valuable tool for my purp…

---

## [Get array type (e.g. Array, CuArray, etc.) from concrete array](https://discourse.julialang.org/t/get-array-type-e-g-array-cuarray-etc-from-concrete-array/85516)

<div class="topic-metadata">

**Author:** [@torrance](https://discourse.julialang.org/u/torrance)\
**Replies:** 9\
**Last updated:** [August 9, 2022, 5:26am UTC](https://discourse.julialang.org/t/get-array-type-e-g-array-cuarray-etc-from-concrete-array/85516 "2022-08-09T05:26:19Z")

</div>

This should be easy, but I haven’t found a way to do it. I want a function that takes some concrete array type (\<: AbstractArray), that might be backed by Array, or CuArray, or ROCArray or whatever, and returns the unpa…

---

## [Use a variable column name to perform operation](https://discourse.julialang.org/t/use-a-variable-column-name-to-perform-operation/85458)

<div class="topic-metadata">

**Author:** [@momo1](https://discourse.julialang.org/u/momo1)\
**Replies:** 2\
**Last updated:** [August 8, 2022, 11:58pm UTC](https://discourse.julialang.org/t/use-a-variable-column-name-to-perform-operation/85458 "2022-08-08T23:58:57Z")

</div>

Hi I’ve a code which needs to be robust to variable column name. I’ve tried the following which fails var = mapwindow(cell -\> mean(map(x -\> columnnames(x)\[findfirst(map(c -\> startswith(string(c), "var\_ "), columnnames…

---

## [Help defining a custom SVector](https://discourse.julialang.org/t/help-defining-a-custom-svector/85424)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 7\
**Last updated:** [August 8, 2022, 11:43pm UTC](https://discourse.julialang.org/t/help-defining-a-custom-svector/85424 "2022-08-08T23:43:06Z")

</div>

The StaticArrays.jl documentation mentions the FieldVector abstract type that developers can use to inherit all the nice behavior of SVector: using StaticArrays struct Vec{T} \<: FieldVector{3,T} x::T y::T z::T en…

---

## [Document / export \`ht\_keyindex()\` from dict.jl?](https://discourse.julialang.org/t/document-export-ht-keyindex-from-dict-jl/83738)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 5\
**Last updated:** [August 8, 2022, 12:35pm UTC](https://discourse.julialang.org/t/document-export-ht-keyindex-from-dict-jl/83738 "2022-08-08T12:35:13Z")

</div>

I’d like to avoid repeated lookup of the memory address of some key in a dictionary. Consider the following code: function delete\_if\_even!(d::Dict, k) if haskey(d, k) && iseven(d\[k\]) delete!(d, k) else …

---

## [Component based ModelingToolkit](https://discourse.julialang.org/t/component-based-modelingtoolkit/85499)

<div class="topic-metadata">

**Author:** [@JOAO\_PEREIRA](https://discourse.julialang.org/u/JOAO_PEREIRA)\
**Replies:** 1\
**Last updated:** [August 8, 2022, 9:45pm UTC](https://discourse.julialang.org/t/component-based-modelingtoolkit/85499 "2022-08-08T21:45:34Z")

</div>

Hi, I would like to solve the system below as a component based modeling. DifferentialEquations is a possibility to solve as steady states. ‘’’ using ModelingToolkit, NonlinearSolve function plant\_7\_1\_b() ModelingToo…

---

## [Folder Navigation for Activating Environments in Package Manager](https://discourse.julialang.org/t/folder-navigation-for-activating-environments-in-package-manager/85502)

<div class="topic-metadata">

**Author:** [@liamfdoherty](https://discourse.julialang.org/u/liamfdoherty)\
**Replies:** 4\
**Last updated:** [August 8, 2022, 9:27pm UTC](https://discourse.julialang.org/t/folder-navigation-for-activating-environments-in-package-manager/85502 "2022-08-08T21:27:24Z")

</div>

I am a Mac user. Let’s say I have a package under development, Foo.jl, that is present under the folder ~/github/Foo.jl on my machine (here the tilde is the home directory, standard for Macs). I am writing another script…

---

## [Question about AlgebraOfGraphics](https://discourse.julialang.org/t/question-about-algebraofgraphics/85481)

<div class="topic-metadata">

**Author:** [@Raymond](https://discourse.julialang.org/u/Raymond)\
**Replies:** 2\
**Last updated:** [August 8, 2022, 8:40pm UTC](https://discourse.julialang.org/t/question-about-algebraofgraphics/85481 "2022-08-08T20:40:40Z")

</div>

Dear all, When I use AlgebraOfGraphics.jl, How can I hide the legend title? Here is an example. using RDatasets, AlgebraOfGraphics, CairoMakie df = dataset("datasets", "iris") plt = data(df) \* mapping(:Species, :SepalL…

---

## [Enabling StatsBase functions in SQLite (Sqlite3Stats)](https://discourse.julialang.org/t/enabling-statsbase-functions-in-sqlite-sqlite3stats/73829)

<div class="topic-metadata">

**Author:** [@jbytecode](https://discourse.julialang.org/u/jbytecode)\
**Replies:** 1\
**Last updated:** [August 8, 2022, 7:15pm UTC](https://discourse.julialang.org/t/enabling-statsbase-functions-in-sqlite-sqlite3stats/73829 "2022-08-08T19:15:29Z")

</div>

Hi guys, I am not sure if it is really needed but it is useful (at least for me) to have aggregative functions such as correlation, skewness, kurtosis, covariance, median absolute deviations, median, geometric and harmo…

---

## [Pushing Julia/statistics development](https://discourse.julialang.org/t/pushing-julia-statistics-development/80111)

<div class="topic-metadata">

**Author:** [@Ajay\_Shah](https://discourse.julialang.org/u/Ajay_Shah)\
**Replies:** 14\
**Last updated:** [August 8, 2022, 6:52pm UTC](https://discourse.julialang.org/t/pushing-julia-statistics-development/80111 "2022-08-08T18:52:09Z")

</div>

Julia is great, but there are many limitations in putting it to work for doing statistics. With the help of Viral, Alan, and @bkamins, a bunch of us got going on a systematic attack on this problem. We have gone after th…

---

## [Alternatives to Query.jl for aggregation](https://discourse.julialang.org/t/alternatives-to-query-jl-for-aggregation/85496)

<div class="topic-metadata">

**Author:** [@IljaK91](https://discourse.julialang.org/u/IljaK91)\
**Replies:** 1\
**Last updated:** [August 8, 2022, 6:32pm UTC](https://discourse.julialang.org/t/alternatives-to-query-jl-for-aggregation/85496 "2022-08-08T18:32:42Z")

</div>

Hi everybody, I am looking for a way to aggregate my data like Query.jl. Usually, I would run something like: test\_df = DataFrame(A = \[1,1,2,2\], B = \[missing, 1, missing, 2\]) df\_agg = test\_df |\> @groupby(\_.A) |\>…

---

## [Error reading an XLSX file](https://discourse.julialang.org/t/error-reading-an-xlsx-file/85352)

<div class="topic-metadata">

**Author:** [@RaquelSantos](https://discourse.julialang.org/u/RaquelSantos)\
**Replies:** 2\
**Last updated:** [August 8, 2022, 6:20pm UTC](https://discourse.julialang.org/t/error-reading-an-xlsx-file/85352 "2022-08-08T18:20:58Z")

</div>

Hello everybody I’m having trouble reading the fields from my XLSX file, when I try this error message appears: MethodError: no method matching iterate(::XLSX.DataTable) using DataFrames, XLSX r = string(@\_\_DIR\_\_,"\\\\t…

---

## [Doubt about function in Julia](https://discourse.julialang.org/t/doubt-about-function-in-julia/85492)

<div class="topic-metadata">

**Author:** [@Rafael\_Brus](https://discourse.julialang.org/u/Rafael_Brus)\
**Replies:** 1\
**Last updated:** [August 8, 2022, 5:42pm UTC](https://discourse.julialang.org/t/doubt-about-function-in-julia/85492 "2022-08-08T17:42:18Z")

</div>

Hello guys, I’m studying Julia and I had a doubt in the following module of SearchLight.jl. module Serializer import SearchLight function serialize end function deserialize end function serializables end # return Ve…

---

## [Acceptable Named Tuple Names?](https://discourse.julialang.org/t/acceptable-named-tuple-names/85489)

<div class="topic-metadata">

**Author:** [@Tim\_Conwell](https://discourse.julialang.org/u/Tim_Conwell)\
**Replies:** 4\
**Last updated:** [August 8, 2022, 5:23pm UTC](https://discourse.julialang.org/t/acceptable-named-tuple-names/85489 "2022-08-08T17:23:07Z")

</div>

I’m working on functions to create html tags and am hoping to create named tuples with names that might include a hyphen for certain attributes. Can named tuples have names with a space or hyphen? How do you declare the …

---

## [Julia BlackBoxOptim set the threshold for determining convergence in the fitness value?](https://discourse.julialang.org/t/julia-blackboxoptim-set-the-threshold-for-determining-convergence-in-the-fitness-value/85494)

<div class="topic-metadata">

**Author:** [@jfanecon](https://discourse.julialang.org/u/jfanecon)\
**Replies:** 0\
**Last updated:** [August 8, 2022, 5:14pm UTC](https://discourse.julialang.org/t/julia-blackboxoptim-set-the-threshold-for-determining-convergence-in-the-fitness-value/85494 "2022-08-08T17:14:30Z")

</div>

Hi, I am using Julia BlackBoxOptim to search for global optima of a function, using default optimizer. The fitness value keeps unchanged for 150 evaluations, so I am wondering whether it is possible to have an option si…

---

## [Solving German Tank Problem by Turing ,but](https://discourse.julialang.org/t/solving-german-tank-problem-by-turing-but/85493)

<div class="topic-metadata">

**Author:** [@kimseok1973](https://discourse.julialang.org/u/kimseok1973)\
**Replies:** 0\
**Last updated:** [August 8, 2022, 5:12pm UTC](https://discourse.julialang.org/t/solving-german-tank-problem-by-turing-but/85493 "2022-08-08T17:12:57Z")

</div>

I would like to solve “German Tank Ploblem” by Turing.jl but it will not work when a model use DiscreteUniform. ss = rand(DiscreteUniform(1,60),8) @model function tank(ds) m ~ Uniform(2,2000) ds .~ Uniform(1,m)…

---

## [PowerModels/PowerModelsDistribution lack of documentation for storage models](https://discourse.julialang.org/t/powermodels-powermodelsdistribution-lack-of-documentation-for-storage-models/85358)

<div class="topic-metadata">

**Author:** [@apigott](https://discourse.julialang.org/u/apigott)\
**Replies:** 3\
**Last updated:** [August 8, 2022, 4:58pm UTC](https://discourse.julialang.org/t/powermodels-powermodelsdistribution-lack-of-documentation-for-storage-models/85358 "2022-08-08T16:58:32Z")

</div>

Hi! New to PM/PMD and currently trying to figure out the OPF with a storage model, unfortunately I’m getting pretty stumped by the results dictionary. I attempted adding storage with the following: case\_file = "../Powe…

---

## [How to deploy MVC server to Nginx](https://discourse.julialang.org/t/how-to-deploy-mvc-server-to-nginx/85363)

<div class="topic-metadata">

**Author:** [@Jack\_N](https://discourse.julialang.org/u/Jack_N)\
**Replies:** 1\
**Last updated:** [August 8, 2022, 4:53pm UTC](https://discourse.julialang.org/t/how-to-deploy-mvc-server-to-nginx/85363 "2022-08-08T16:53:42Z")

</div>

I tried following the tutorial at the link below to set up Nginx with my website, but I am confused about what folder to pick as the Nginx config root since my landing html page is in the /app/resources/resource/views, n…

---

## [Comparing exp() performance on Julia versus numpy](https://discourse.julialang.org/t/comparing-exp-performance-on-julia-versus-numpy/85325)

<div class="topic-metadata">

**Author:** [@torrance](https://discourse.julialang.org/u/torrance)\
**Replies:** 38\
**Last updated:** [August 8, 2022, 4:12pm UTC](https://discourse.julialang.org/t/comparing-exp-performance-on-julia-versus-numpy/85325 "2022-08-08T16:12:15Z")

</div>

So I was actually preparing a demo to show off Julia to colleagues when I encountered this issue. I want to simply compute the exponential of an array. In Julia (v. 1.7.2): arr = rand(100\_000) @benchmark exp.($arr) # …

---

## [Julia Copenhagen Meetup the 18th of August at PFA](https://discourse.julialang.org/t/julia-copenhagen-meetup-the-18th-of-august-at-pfa/85482)

<div class="topic-metadata">

**Author:** [@wc4wc4wc4](https://discourse.julialang.org/u/wc4wc4wc4)\
**Replies:** 2\
**Last updated:** [August 8, 2022, 3:34pm UTC](https://discourse.julialang.org/t/julia-copenhagen-meetup-the-18th-of-august-at-pfa/85482 "2022-08-08T15:34:48Z")

</div>

The next Julia Copenhagen meetup will be the 18th of August at PFA. Remember to sign up (and get a free sandwich) here: Login to Meetup | Meetup. Looking forward to seeing as many as possible!

---

## [Unconventional use of \`merge\`](https://discourse.julialang.org/t/unconventional-use-of-merge/85472)

<div class="topic-metadata">

**Author:** [@danielsoutar](https://discourse.julialang.org/u/danielsoutar)\
**Replies:** 2\
**Last updated:** [August 8, 2022, 2:40pm UTC](https://discourse.julialang.org/t/unconventional-use-of-merge/85472 "2022-08-08T14:40:57Z")

</div>

TL;DR: I understand at a high level what this code is doing, but the implementation is very unusual and I don’t understand what is going on. I have the following the code that someone else wrote: """ deep\_merge(d..…

---

## [GaussianMixtures.jl - Equivalent of sklearn GaussianMixture.predict](https://discourse.julialang.org/t/gaussianmixtures-jl-equivalent-of-sklearn-gaussianmixture-predict/85480)

<div class="topic-metadata">

**Author:** [@vikram-s-narayan](https://discourse.julialang.org/u/vikram-s-narayan)\
**Replies:** 0\
**Last updated:** [August 8, 2022, 2:30pm UTC](https://discourse.julialang.org/t/gaussianmixtures-jl-equivalent-of-sklearn-gaussianmixture-predict/85480 "2022-08-08T14:30:49Z")

</div>

I’m trying to recreate the equivalent of SKLearn’s documentation example with GaussianMixtures.jl. The SKLearn example is below: import numpy as np from sklearn.mixture import GaussianMixture X = np.array(\[\[1, 2\], \[1, …

---

## [Check type stability of a struct](https://discourse.julialang.org/t/check-type-stability-of-a-struct/85343)

<div class="topic-metadata">

**Author:** [@filchristou](https://discourse.julialang.org/u/filchristou)\
**Replies:** 5\
**Last updated:** [August 8, 2022, 2:28pm UTC](https://discourse.julialang.org/t/check-type-stability-of-a-struct/85343 "2022-08-08T14:28:45Z")

</div>

We usually speak of type stability for functions and we also have the tools to determine that (like @code\_warntype). But say I would like to check whether a struct is type-stable, in the sense that it is well defined an…

---

## [Performance of printing a type name](https://discourse.julialang.org/t/performance-of-printing-a-type-name/85468)

<div class="topic-metadata">

**Author:** [@ikirill](https://discourse.julialang.org/u/ikirill)\
**Replies:** 3\
**Last updated:** [August 8, 2022, 2:27pm UTC](https://discourse.julialang.org/t/performance-of-printing-a-type-name/85468 "2022-08-08T14:27:14Z")

</div>

Is this expected, or is this a bug? Printing Val(:hello\_world) is ~1000 times slower than printing :hello\_world, and I imagine this affects things like printing stack traces with complicated types. julia\> @benchmark str…

---

## [Fill function for a tuple](https://discourse.julialang.org/t/fill-function-for-a-tuple/85400)

<div class="topic-metadata">

**Author:** [@james3](https://discourse.julialang.org/u/james3)\
**Replies:** 6\
**Last updated:** [August 8, 2022, 2:03pm UTC](https://discourse.julialang.org/t/fill-function-for-a-tuple/85400 "2022-08-08T14:03:58Z")

</div>

I need to create a tuple with the value r repeated N times. Creating an array would be easy, as I could just do fill(r, N). How can I do this, but creating a tuple instead?

---

## [Resources for Differentiable Programming](https://discourse.julialang.org/t/resources-for-differentiable-programming/85369)

<div class="topic-metadata">

**Author:** [@franfram](https://discourse.julialang.org/u/franfram)\
**Replies:** 3\
**Last updated:** [August 8, 2022, 1:19pm UTC](https://discourse.julialang.org/t/resources-for-differentiable-programming/85369 "2022-08-08T13:19:06Z")

</div>

Hello everyone, I’m looking for workshops or another type of resource for learning differentiable programming with Julia (other than julia’s documentation on differentiable programming packages like Zygote). Any resour…

---

## [Let-in macro](https://discourse.julialang.org/t/let-in-macro/85431)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 6\
**Last updated:** [August 8, 2022, 1:03pm UTC](https://discourse.julialang.org/t/let-in-macro/85431 "2022-08-08T13:03:29Z")

</div>

I want a macro like this: @let begin a = 1 b = 2 in y = a + b z = a - b end defines in the containing scope y and z in terms of a and b, without defining a and b in the containing scope. How can I do this?

---

## [Dateformat Makie](https://discourse.julialang.org/t/dateformat-makie/85381)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 2\
**Last updated:** [August 8, 2022, 12:55pm UTC](https://discourse.julialang.org/t/dateformat-makie/85381 "2022-08-08T12:55:31Z")

</div>

In AoG I’m trying to do draw(;axis=(;xtickformat=dateformat"yyyy-mm")) . How can I get what I want?

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

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