# Latest

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

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

**Page:** 1174

---

## [Computing discrete Wasserstein (EMD) distance in Julia?](https://discourse.julialang.org/t/computing-discrete-wasserstein-emd-distance-in-julia/9600)

<div class="topic-metadata">

**Author:** [@raff](https://discourse.julialang.org/u/raff)\
**Replies:** 16\
**Last updated:** [December 20, 2021, 3:49pm UTC](https://discourse.julialang.org/t/computing-discrete-wasserstein-emd-distance-in-julia/9600 "2021-12-20T15:49:47Z")

</div>

Is there any library in Julia for computing discrete Wasserstein (EMD) given two discrete distributions? Python seems to have a tool for that http://pot.readthedocs.io/en/stable/index.html, but if a pure Julia solution …

---

## [Thickness\_scaling creates unwanted wide left margin](https://discourse.julialang.org/t/thickness-scaling-creates-unwanted-wide-left-margin/73361)

<div class="topic-metadata">

**Author:** [@parb](https://discourse.julialang.org/u/parb)\
**Replies:** 1\
**Last updated:** [December 20, 2021, 3:49pm UTC](https://discourse.julialang.org/t/thickness-scaling-creates-unwanted-wide-left-margin/73361 "2021-12-20T15:49:42Z")

</div>

Hi all When using thickness\_scaling=2, a wide left and bottom margins are added to the plot. These margins cannot be reduced with the margins attribute. How do I remove the margins created by using thickness\_scaling? u…

---

## [Changing strings at the beginning of a large file](https://discourse.julialang.org/t/changing-strings-at-the-beginning-of-a-large-file/73365)

<div class="topic-metadata">

**Author:** [@Fred](https://discourse.julialang.org/u/Fred)\
**Replies:** 12\
**Last updated:** [December 20, 2021, 3:32pm UTC](https://discourse.julialang.org/t/changing-strings-at-the-beginning-of-a-large-file/73365 "2021-12-20T15:32:47Z")

</div>

Hi ! I have large CSV/TSV tables and I want to change some column names using a Julia program. I think that loading these large tables into DataFrames will consume a lot or RAM and be slow as well. My idea was to use r…

---

## [Call for Proposals is now open for SciMLCon 2022](https://discourse.julialang.org/t/call-for-proposals-is-now-open-for-scimlcon-2022/73368)

<div class="topic-metadata">

**Author:** [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Replies:** 1\
**Last updated:** [December 20, 2021, 2:21pm UTC](https://discourse.julialang.org/t/call-for-proposals-is-now-open-for-scimlcon-2022/73368 "2021-12-20T14:21:05Z")

</div>

We are pleased to announce a new conference in the Julia sphere, SciMLCon, focused on celebrating the advancements and applications of the SciML Open Source Software ecosystem. With that, the SciMLCon 2022 Call for Propo…

---

## [How to rewrite this macro?](https://discourse.julialang.org/t/how-to-rewrite-this-macro/73333)

<div class="topic-metadata">

**Author:** [@Bardo](https://discourse.julialang.org/u/Bardo)\
**Replies:** 2\
**Last updated:** [December 19, 2021, 5:13pm UTC](https://discourse.julialang.org/t/how-to-rewrite-this-macro/73333 "2021-12-19T17:13:51Z")

</div>

I use the macro below for a partial evaluation for a Macro to serialize a linear solver code. The code change is done on the string form. Can the macro be written without converting forth and back? Got lost in quoting…

---

## [Struct with array of pointers to other structs of the same type as field](https://discourse.julialang.org/t/struct-with-array-of-pointers-to-other-structs-of-the-same-type-as-field/73248)

<div class="topic-metadata">

**Author:** [@BelaMulder](https://discourse.julialang.org/u/BelaMulder)\
**Replies:** 3\
**Last updated:** [December 20, 2021, 1:48pm UTC](https://discourse.julialang.org/t/struct-with-array-of-pointers-to-other-structs-of-the-same-type-as-field/73248 "2021-12-20T13:48:29Z")

</div>

Newbie question: I would like to implement lattice structure as an array of structs named Node, where each Node contains as one of its field a list of its neighbouring Nodes in the lattice. My, possibly naive, first try …

---

## [Proper way to install Julia on a multi-user linux VM?](https://discourse.julialang.org/t/proper-way-to-install-julia-on-a-multi-user-linux-vm/73358)

<div class="topic-metadata">

**Author:** [@StatisticalMouse](https://discourse.julialang.org/u/StatisticalMouse)\
**Replies:** 2\
**Last updated:** [December 20, 2021, 11:27am UTC](https://discourse.julialang.org/t/proper-way-to-install-julia-on-a-multi-user-linux-vm/73358 "2021-12-20T11:27:01Z")

</div>

I can install Julia for a single user easily, but how should I install it on a linux VM so that all users are able to use it properly? My concern is mostly about the loaded packages, pre-compilation, settings, that sort…

---

## [Displaying column data as columns?](https://discourse.julialang.org/t/displaying-column-data-as-columns/72855)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 8\
**Last updated:** [December 20, 2021, 11:15am UTC](https://discourse.julialang.org/t/displaying-column-data-as-columns/72855 "2021-12-20T11:15:41Z")

</div>

A is a 1-column data with 3 elements: A = \[1, 2, 3, 4, 5\]; Right now, if do the below: @show A; The below will be shown on my REPL: A = \[1, 2, 3, 4, 5\]; Is there a way I can set up Julia, so that it will display co…

---

## [Confused by macros and their hygene](https://discourse.julialang.org/t/confused-by-macros-and-their-hygene/73362)

<div class="topic-metadata">

**Author:** [@JackStrauss](https://discourse.julialang.org/u/JackStrauss)\
**Replies:** 3\
**Last updated:** [December 20, 2021, 11:06am UTC](https://discourse.julialang.org/t/confused-by-macros-and-their-hygene/73362 "2021-12-20T11:06:14Z")

</div>

Hello I know there is a simple solution to this but my search skills have failed me. Suppose I have a a macro like macro P(ex) return quote if Print println($ex) end end end then Pr…

---

## [Why are irregularly shaped arrays of arrays of type Any in Julia?](https://discourse.julialang.org/t/why-are-irregularly-shaped-arrays-of-arrays-of-type-any-in-julia/73339)

<div class="topic-metadata">

**Author:** [@gabriben](https://discourse.julialang.org/u/gabriben)\
**Replies:** 8\
**Last updated:** [December 20, 2021, 10:42am UTC](https://discourse.julialang.org/t/why-are-irregularly-shaped-arrays-of-arrays-of-type-any-in-julia/73339 "2021-12-20T10:42:12Z")

</div>

Hi, this is a bit of an edge case coming from trying something out with yesterday’s adventOfCode challenge (day 18). Why are irregularly shaped arrays of arrays of type Any? For example: julia\> \[\[2, 9\], 3\] 2-element V…

---

## [Instantiate ignores the \[compat\] section of a project file](https://discourse.julialang.org/t/instantiate-ignores-the-compat-section-of-a-project-file/73334)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 6\
**Last updated:** [December 20, 2021, 9:29am UTC](https://discourse.julialang.org/t/instantiate-ignores-the-compat-section-of-a-project-file/73334 "2021-12-20T09:29:43Z")

</div>

I have the following Project.toml file (please scroll down to see the end of it): \[deps\] Arrow = "69666777-d1a9-59fb-9406-91d4454c9d45" BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" CSV = "336ed68f-0bac-5ca0-8…

---

## [Equivalent of numpy.repeat](https://discourse.julialang.org/t/equivalent-of-numpy-repeat/73359)

<div class="topic-metadata">

**Author:** [@CompulsoryCoffee](https://discourse.julialang.org/u/CompulsoryCoffee)\
**Replies:** 2\
**Last updated:** [December 20, 2021, 8:51am UTC](https://discourse.julialang.org/t/equivalent-of-numpy-repeat/73359 "2021-12-20T08:51:57Z")

</div>

Hi, I found some comments on the matter online but nothing that would repeat elekemtn of a list based on a count given by a list like: import numpy as np x = np.array(\[1, 2\]) print np.repeat(x, \[2, 3\], axis=0) I wou…

---

## [Using dates as axis labels](https://discourse.julialang.org/t/using-dates-as-axis-labels/73294)

<div class="topic-metadata">

**Author:** [@sransome](https://discourse.julialang.org/u/sransome)\
**Replies:** 4\
**Last updated:** [December 20, 2021, 8:19am UTC](https://discourse.julialang.org/t/using-dates-as-axis-labels/73294 "2021-12-20T08:19:56Z")

</div>

Hi, I can’t figure out how to display a string, eg representing a date for the x axis labels for time series data using makie.jl. Perhaps this is just a symptom of a broader level of incompetance. I tried something li…

---

## [Embed webcam in Pluto](https://discourse.julialang.org/t/embed-webcam-in-pluto/45989)

<div class="topic-metadata">

**Author:** [@evad](https://discourse.julialang.org/u/evad)\
**Replies:** 16\
**Last updated:** [December 20, 2021, 7:30am UTC](https://discourse.julialang.org/t/embed-webcam-in-pluto/45989 "2021-12-20T07:30:29Z")

</div>

It was so cool to see a webcam embedded in a Pluto notebook. But as I tried out the codes shown in the screenshot, I got an error saying camera\_input not defined. So what is missing here to achieve the same?:thinking:…

---

## [How to cleanup manifest\_usage.toml?](https://discourse.julialang.org/t/how-to-cleanup-manifest-usage-toml/73349)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 2\
**Last updated:** [December 20, 2021, 6:43am UTC](https://discourse.julialang.org/t/how-to-cleanup-manifest-usage-toml/73349 "2021-12-20T06:43:03Z")

</div>

manifest\_usage.toml lists many manifests from projects that are not currently present in my machine. Is there a way to clean that up?

---

## [Lazy or efficient representation of \`repeat\` function on Arrays?](https://discourse.julialang.org/t/lazy-or-efficient-representation-of-repeat-function-on-arrays/73356)

<div class="topic-metadata">

**Author:** [@yewalenikhil65](https://discourse.julialang.org/u/yewalenikhil65)\
**Replies:** 0\
**Last updated:** [December 20, 2021, 4:32am UTC](https://discourse.julialang.org/t/lazy-or-efficient-representation-of-repeat-function-on-arrays/73356 "2021-12-20T04:32:56Z")

</div>

what is the best( lazy ? ) way to represent repeat function (other than doing following) the following julia\> @btime A = repeat(\[1 2\],3,1) 116.760 ns (2 allocations: 192 bytes) 3×2 Matrix{Int64}: 1 2 1 2 1 2 i…

---

## [Functions to merge DataFrames by nearest date that is earlier?](https://discourse.julialang.org/t/functions-to-merge-dataframes-by-nearest-date-that-is-earlier/73195)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 4\
**Last updated:** [December 20, 2021, 3:58am UTC](https://discourse.julialang.org/t/functions-to-merge-dataframes-by-nearest-date-that-is-earlier/73195 "2021-12-20T03:58:52Z")

</div>

Say I have two dataframes but I wish to join them such that val2 from Table 2 is merge on to Table 1 if and only if Table2.date \< Table1.date and Table2.date is the closest to Table1.date Table 1 date, val1 2021-12-16,…

---

## [Problem with parentheses around quoted expression in generated function](https://discourse.julialang.org/t/problem-with-parentheses-around-quoted-expression-in-generated-function/73347)

<div class="topic-metadata">

**Author:** [@evf](https://discourse.julialang.org/u/evf)\
**Replies:** 2\
**Last updated:** [December 19, 2021, 9:36pm UTC](https://discourse.julialang.org/t/problem-with-parentheses-around-quoted-expression-in-generated-function/73347 "2021-12-19T21:36:43Z")

</div>

Hello everyone. I’m trying to use generated functions to write functions that would return the sum of the values of the nearest neighbors of given site in a multidimensional integer periodic lattice. For example: In a …

---

## [Is it possible to apply one schema to different DataFrames?](https://discourse.julialang.org/t/is-it-possible-to-apply-one-schema-to-different-dataframes/73345)

<div class="topic-metadata">

**Author:** [@PharmCat](https://discourse.julialang.org/u/PharmCat)\
**Replies:** 2\
**Last updated:** [December 19, 2021, 7:59pm UTC](https://discourse.julialang.org/t/is-it-possible-to-apply-one-schema-to-different-dataframes/73345 "2021-12-19T19:59:45Z")

</div>

Hi! I have an external ‘ModelFrame’ that was created like this: sch = schema(model, data, contrasts) f = apply\_schema(model, sch, StatisticalModel) mf = ModelFrame(f, sch, data, StatisticalModel) I kno…

---

## [How to enter many input variables in Pluto without triggering a full calculation each time](https://discourse.julialang.org/t/how-to-enter-many-input-variables-in-pluto-without-triggering-a-full-calculation-each-time/73196)

<div class="topic-metadata">

**Author:** [@adannenberg](https://discourse.julialang.org/u/adannenberg)\
**Replies:** 15\
**Last updated:** [December 19, 2021, 8:06pm UTC](https://discourse.julialang.org/t/how-to-enter-many-input-variables-in-pluto-without-triggering-a-full-calculation-each-time/73196 "2021-12-19T20:06:08Z")

</div>

A very basic question, so I apologize if it’s been dealt with elsewhere - I did look. Suppose I have some function f(x1, x2, x3, x4, …) that is compute intensive and takes a long time to return. How can I enter specifi…

---

## [Nested multi-thread](https://discourse.julialang.org/t/nested-multi-thread/73073)

<div class="topic-metadata">

**Author:** [@juliauser](https://discourse.julialang.org/u/juliauser)\
**Replies:** 13\
**Last updated:** [December 19, 2021, 8:01pm UTC](https://discourse.julialang.org/t/nested-multi-thread/73073 "2021-12-19T20:01:53Z")

</div>

I have N groups. For each group I have J\*K options for each agent i. I want to find the maximum over j,k for each I, and do so for each group n. The problems are all separate from each others. Threads.@threads…

---

## [Training a MLJ model on a large dataset](https://discourse.julialang.org/t/training-a-mlj-model-on-a-large-dataset/73321)

<div class="topic-metadata">

**Author:** [@jlwoolf](https://discourse.julialang.org/u/jlwoolf)\
**Replies:** 2\
**Last updated:** [December 19, 2021, 7:44pm UTC](https://discourse.julialang.org/t/training-a-mlj-model-on-a-large-dataset/73321 "2021-12-19T19:44:26Z")

</div>

Hello, I am somewhat new to Julia and the MLJ library. I am currently using a preexisting model, and would like to train it on a large dataset. However, I am running out of memory when calling fit with all the data. Eac…

---

## [Write-out simulation data from Julia to other file formats (JSON, …)](https://discourse.julialang.org/t/write-out-simulation-data-from-julia-to-other-file-formats-json/73341)

<div class="topic-metadata">

**Author:** [@Chimel](https://discourse.julialang.org/u/Chimel)\
**Replies:** 2\
**Last updated:** [December 19, 2021, 7:27pm UTC](https://discourse.julialang.org/t/write-out-simulation-data-from-julia-to-other-file-formats-json/73341 "2021-12-19T19:27:10Z")

</div>

Hello, Is there a tool/method to write-out simulation data to other formats such as: JSON, yaml, xml, text files, csv, vdb, alembic (abc), lossless image file, exr, fbx, obj, gltf, hdf5? So that it can be imported into…

---

## [KernelAbstractions nested task error: UndefVarError: variable not defined](https://discourse.julialang.org/t/kernelabstractions-nested-task-error-undefvarerror-variable-not-defined/73342)

<div class="topic-metadata">

**Author:** [@Marcell\_Havlik](https://discourse.julialang.org/u/Marcell_Havlik)\
**Replies:** 1\
**Last updated:** [December 19, 2021, 7:03pm UTC](https://discourse.julialang.org/t/kernelabstractions-nested-task-error-undefvarerror-variable-not-defined/73342 "2021-12-19T19:03:14Z")

</div>

Hey, I am facing interesting issues with KernelAbstractions. Why is this code: using KernelAbstractions using CUDA using CUDAKernels @kernel synctesttt(epoch) = begin I = @index(Global) eex=1 while eex \<= epoch @…

---

## [How to simply this without writing a loop?](https://discourse.julialang.org/t/how-to-simply-this-without-writing-a-loop/73337)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 10\
**Last updated:** [December 19, 2021, 6:32pm UTC](https://discourse.julialang.org/t/how-to-simply-this-without-writing-a-loop/73337 "2021-12-19T18:32:06Z")

</div>

For example, I have 4 parameters: A, B, C, and D, each representing an observed property. Each stores a matrix with the size of 360 x 180. Below is my loop: Vars = \["A", "B", "C", "D"\]; for i in Vars if i == "A" …

---

## [MWE fitting a model with a known parameter](https://discourse.julialang.org/t/mwe-fitting-a-model-with-a-known-parameter/73308)

<div class="topic-metadata">

**Author:** [@AlexisRenchon](https://discourse.julialang.org/u/AlexisRenchon)\
**Replies:** 14\
**Last updated:** [December 19, 2021, 5:02pm UTC](https://discourse.julialang.org/t/mwe-fitting-a-model-with-a-known-parameter/73308 "2021-12-19T17:02:18Z")

</div>

Hello, I have a (soil respiration) model, with soil temperature and soil moisture as input variables, and a bunch of parameters, see the code below. I am trying to figure out how to fit the model when one (or more) para…

---

## [Makie 3D scatter animation flow field](https://discourse.julialang.org/t/makie-3d-scatter-animation-flow-field/53056)

<div class="topic-metadata">

**Author:** [@fgerick](https://discourse.julialang.org/u/fgerick)\
**Replies:** 9\
**Last updated:** [December 19, 2021, 4:20pm UTC](https://discourse.julialang.org/t/makie-3d-scatter-animation-flow-field/53056 "2021-12-19T16:20:45Z")

</div>

Hi everyone, I’m trying to make a particle tracking animation of a flow field with Makie. One thing I observed was an “artifact” when the scatter dots move away from the camera. Then they’re surrounded by a small white …

---

## [How can I plot 3 moveable planes with sliders? To get an intersection point or line?](https://discourse.julialang.org/t/how-can-i-plot-3-moveable-planes-with-sliders-to-get-an-intersection-point-or-line/73331)

<div class="topic-metadata">

**Author:** [@Tam](https://discourse.julialang.org/u/Tam)\
**Replies:** 1\
**Last updated:** [December 19, 2021, 3:37pm UTC](https://discourse.julialang.org/t/how-can-i-plot-3-moveable-planes-with-sliders-to-get-an-intersection-point-or-line/73331 "2021-12-19T15:37:45Z")

</div>

---

## [Transpose vector of vectors](https://discourse.julialang.org/t/transpose-vector-of-vectors/73313)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 11\
**Last updated:** [December 19, 2021, 1:26pm UTC](https://discourse.julialang.org/t/transpose-vector-of-vectors/73313 "2021-12-19T13:26:58Z")

</div>

Is there a shorter way to write this? n = 1000; m = 5000 xss = \[repeat(\[j\], n) for j in 1:m\] yss = \[\[\] for \_ in xss\[1\]\] for xs in xss for (x, ys) in zip(xs, yss) push!(ys, x) end end Maybe there is an…

---

## [Log4jl Julia package security concern](https://discourse.julialang.org/t/log4jl-julia-package-security-concern/73258)

<div class="topic-metadata">

**Author:** [@Sascha\_McDonald](https://discourse.julialang.org/u/Sascha_McDonald)\
**Replies:** 8\
**Last updated:** [December 19, 2021, 1:24pm UTC](https://discourse.julialang.org/t/log4jl-julia-package-security-concern/73258 "2021-12-19T13:24:22Z")

</div>

Hey Guys, “Log4jl has similar architecture as Apache Log4j 2 framework.” Sorry if this is already been addressed. However, I haven’t been able to find any sign of a security statement from the community about the follo…

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

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