# Latest

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

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

**Page:** 532

---

## [Trouble translating some dplyr code to DataFramesMeta](https://discourse.julialang.org/t/trouble-translating-some-dplyr-code-to-dataframesmeta/107555)

<div class="topic-metadata">

**Author:** [@wasser\_m](https://discourse.julialang.org/u/wasser_m)\
**Replies:** 2\
**Last updated:** [December 13, 2023, 5:28pm UTC](https://discourse.julialang.org/t/trouble-translating-some-dplyr-code-to-dataframesmeta/107555 "2023-12-13T17:28:58Z")

</div>

I’m quite new to DataFrames and tried to translate some of my R code to Julia. Here is my R code: df |\> left\_join(df2, by="customer") |\> left\_join(df3, by="order") |\> left\_join(df4, by="item") |\> group\_by(order…

---

## [How does ModelingToolkit use bounds metadata?](https://discourse.julialang.org/t/how-does-modelingtoolkit-use-bounds-metadata/81487)

<div class="topic-metadata">

**Author:** [@jedforrest](https://discourse.julialang.org/u/jedforrest)\
**Replies:** 17\
**Last updated:** [December 13, 2023, 5:18pm UTC](https://discourse.julialang.org/t/how-does-modelingtoolkit-use-bounds-metadata/81487 "2023-12-13T17:18:24Z")

</div>

Hi all, What is the purpose of the bounds symbolic metadata in ModelingToolkit? When I add bounds to x in the following code, I would at first expect the solution for x to be limited between 0 and 2, but this doesn’t s…

---

## [RE: Weighted Statistics with Missings](https://discourse.julialang.org/t/re-weighted-statistics-with-missings/107502)

<div class="topic-metadata">

**Author:** [@gaspardelanuit](https://discourse.julialang.org/u/gaspardelanuit)\
**Replies:** 19\
**Last updated:** [December 13, 2023, 4:51pm UTC](https://discourse.julialang.org/t/re-weighted-statistics-with-missings/107502 "2023-12-13T16:51:34Z")

</div>

There was a post on this topic a few years ago. I ran into this recently and thought this would be occasion to mention it again. I have not found an idiomatic way to solve the problem and from discussions of how to imp…

---

## [How do I fix this error I got when trying the first FastAI example?](https://discourse.julialang.org/t/how-do-i-fix-this-error-i-got-when-trying-the-first-fastai-example/106586)

<div class="topic-metadata">

**Author:** [@Tetrakai](https://discourse.julialang.org/u/Tetrakai)\
**Replies:** 4\
**Last updated:** [December 13, 2023, 3:58pm UTC](https://discourse.julialang.org/t/how-do-i-fix-this-error-i-got-when-trying-the-first-fastai-example/106586 "2023-12-13T15:58:21Z")

</div>

I tried the example in the readme: using FastAI, FastVision data, blocks = load(datarecipes()\["imagenette2-320"\]) task = ImageClassificationSingle(blocks) learner = tasklearner(task, data, callbacks=\[ToGPU()\]) fitonecyc…

---

## [JuliaSimModelOptimiser, UDEs, network and model connection](https://discourse.julialang.org/t/juliasimmodeloptimiser-udes-network-and-model-connection/107569)

<div class="topic-metadata">

**Author:** [@rpex](https://discourse.julialang.org/u/rpex)\
**Replies:** 1\
**Last updated:** [December 13, 2023, 3:24pm UTC](https://discourse.julialang.org/t/juliasimmodeloptimiser-udes-network-and-model-connection/107569 "2023-12-13T15:24:32Z")

</div>

When I use Neural Automated Model Discovery for Autocompleting Models with Prior Structural Information from JuliaSimModelOptimiser. How is the neural network connected with the incomplete model? Is it: \\frac{d states}…

---

## [Accurate derivative for tanh](https://discourse.julialang.org/t/accurate-derivative-for-tanh/107568)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 13\
**Last updated:** [December 13, 2023, 2:43pm UTC](https://discourse.julialang.org/t/accurate-derivative-for-tanh/107568 "2023-12-13T14:43:45Z")

</div>

When debugging a computation, I found that the derivative of tanh as defined in DiffRules.jl suffers from catastrophic cancellation for pretty mild values (eg outside 20 in absolute value, examples below). I propose a s…

---

## [Broadcasting slower than for-loop](https://discourse.julialang.org/t/broadcasting-slower-than-for-loop/107562)

<div class="topic-metadata">

**Author:** [@Matthijs\_1971](https://discourse.julialang.org/u/Matthijs_1971)\
**Replies:** 6\
**Last updated:** [December 13, 2023, 2:16pm UTC](https://discourse.julialang.org/t/broadcasting-slower-than-for-loop/107562 "2023-12-13T14:16:39Z")

</div>

There has been some discussion on several fora on the speed of broadcasting vs. a for loop - some aspects escape me. The output of the Julia script below: Explicit for loop: 1.310 μs (0 allocations: 0 bytes) 1.309 μ…

---

## [Ferrite 2D problem unphysical results](https://discourse.julialang.org/t/ferrite-2d-problem-unphysical-results/107037)

<div class="topic-metadata">

**Author:** [@c\_sell](https://discourse.julialang.org/u/c_sell)\
**Replies:** 2\
**Last updated:** [December 13, 2023, 2:21pm UTC](https://discourse.julialang.org/t/ferrite-2d-problem-unphysical-results/107037 "2023-12-13T14:21:47Z")

</div>

Hello, I am using the latest version of Ferrite (Ferrite v0.3.14). I’ve simplified my problem to a small 2D rectangular structure (height = 1; width = 2). The left side is clamped, and on the right-hand side, there is s…

---

## [Where is 'findprev' located?](https://discourse.julialang.org/t/where-is-findprev-located/107407)

<div class="topic-metadata">

**Author:** [@jiang\_ming\_zhang](https://discourse.julialang.org/u/jiang_ming_zhang)\
**Replies:** 7\
**Last updated:** [December 13, 2023, 2:01pm UTC](https://discourse.julialang.org/t/where-is-findprev-located/107407 "2023-12-13T14:01:49Z")

</div>

I guess it is from the Base module. How to find it out?

---

## [Multivariate normal distribution?](https://discourse.julialang.org/t/multivariate-normal-distribution/107560)

<div class="topic-metadata">

**Author:** [@disaster](https://discourse.julialang.org/u/disaster)\
**Replies:** 3\
**Last updated:** [December 13, 2023, 12:32pm UTC](https://discourse.julialang.org/t/multivariate-normal-distribution/107560 "2023-12-13T12:32:39Z")

</div>

Hello, i’m new to Julia and have to plot a multivariate normal distribution. If i use MvNormal and try to plot it like plot(x\_values,MvNormal) I get the Error Cannot convert FullNormal to series data for plotting stacktr…

---

## [How to put labels for arrows?](https://discourse.julialang.org/t/how-to-put-labels-for-arrows/107524)

<div class="topic-metadata">

**Author:** [@vladdez](https://discourse.julialang.org/u/vladdez)\
**Replies:** 1\
**Last updated:** [December 12, 2023, 10:48pm UTC](https://discourse.julialang.org/t/how-to-put-labels-for-arrows/107524 "2023-12-12T22:48:13Z")

</div>

I simply want to recreate smth like here: Arrows with labels: on the sides or on the tops.

---

## [Static Array With Random Numbers From a Uniform Distribution](https://discourse.julialang.org/t/static-array-with-random-numbers-from-a-uniform-distribution/107513)

<div class="topic-metadata">

**Author:** [@hakanc](https://discourse.julialang.org/u/hakanc)\
**Replies:** 9\
**Last updated:** [December 13, 2023, 10:56am UTC](https://discourse.julialang.org/t/static-array-with-random-numbers-from-a-uniform-distribution/107513 "2023-12-13T10:56:44Z")

</div>

I am trying to define a static array with numbers pulled from a uniform distribution (using Distributions) from -1 to 1. It is easy to generate a matrix: pvec=rand(Uniform(-1, 1), 3,10) But I want to have a static arra…

---

## [Is there a DataFrame that can be memory mapped to a file?](https://discourse.julialang.org/t/is-there-a-dataframe-that-can-be-memory-mapped-to-a-file/96926)

<div class="topic-metadata">

**Author:** [@ktdq](https://discourse.julialang.org/u/ktdq)\
**Replies:** 7\
**Last updated:** [December 13, 2023, 10:35am UTC](https://discourse.julialang.org/t/is-there-a-dataframe-that-can-be-memory-mapped-to-a-file/96926 "2023-12-13T10:35:23Z")

</div>

Just saw Make loading weights 10-100x faster on Hacker News Is there something equivalent in Julia? Is there a way to store DataFrame in a file so it loads instantly via mmap?

---

## [How can I extend a GridPosition?](https://discourse.julialang.org/t/how-can-i-extend-a-gridposition/107527)

<div class="topic-metadata">

**Author:** [@vladdez](https://discourse.julialang.org/u/vladdez)\
**Replies:** 2\
**Last updated:** [December 13, 2023, 9:13am UTC](https://discourse.julialang.org/t/how-can-i-extend-a-gridposition/107527 "2023-12-13T09:13:12Z")

</div>

I have plot with multiple subplots, each of it is a GridPosition. f = Figure(resolution = (1200, 1400)) ga = f\[1, 1\] gc = f\[2, 1\] ge = f\[3, 1\] gg = f\[4, 1\] gb = f\[1, 2\] gd = f\[2, 2\] gf = f\[3,…

---

## [Getting ForwardDiff.Dual to propagate through function](https://discourse.julialang.org/t/getting-forwarddiff-dual-to-propagate-through-function/107506)

<div class="topic-metadata">

**Author:** [@keynescoefen](https://discourse.julialang.org/u/keynescoefen)\
**Replies:** 5\
**Last updated:** [December 13, 2023, 8:01am UTC](https://discourse.julialang.org/t/getting-forwarddiff-dual-to-propagate-through-function/107506 "2023-12-13T08:01:43Z")

</div>

Hello! I would like to automatically differentiate a log-likelihood to obtain gradients and Hessians but have trouble propagating ForwardDiff.Dual types through my function. I have the same questions as here and tried t…

---

## [How to compute the bipartite entanglement entropy with the first site as the subsystem us orthogonalize？？](https://discourse.julialang.org/t/how-to-compute-the-bipartite-entanglement-entropy-with-the-first-site-as-the-subsystem-us-orthogonalize/107509)

<div class="topic-metadata">

**Author:** [@zipeilee](https://discourse.julialang.org/u/zipeilee)\
**Replies:** 3\
**Last updated:** [December 13, 2023, 3:17am UTC](https://discourse.julialang.org/t/how-to-compute-the-bipartite-entanglement-entropy-with-the-first-site-as-the-subsystem-us-orthogonalize/107509 "2023-12-13T03:17:54Z")

</div>

I’m new to tensor networks. I understand that for an MPS state in the form of orthogonalization, the bipartite entanglement entropy of a subsystem is center site’s singular spectrum. I’ve found useful code on ITensors.jl…

---

## [How to link axes in a Makie figure?](https://discourse.julialang.org/t/how-to-link-axes-in-a-makie-figure/62622)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 7\
**Last updated:** [December 13, 2023, 1:26am UTC](https://discourse.julialang.org/t/how-to-link-axes-in-a-makie-figure/62622 "2023-12-13T01:26:15Z")

</div>

Suppose I have a figure with multiple subfigures: using GLMakie fig = Figure() scatter(fig\[1,1\], rand(10)) scatter(fig\[1,2\], rand(10)) How to link all axes in the figure? I am aware of linkaxes! but it expects axes ob…

---

## [Configurations.jl Read Vector of Multiple Possible Types from TOML File](https://discourse.julialang.org/t/configurations-jl-read-vector-of-multiple-possible-types-from-toml-file/107541)

<div class="topic-metadata">

**Author:** [@matthew3245](https://discourse.julialang.org/u/matthew3245)\
**Replies:** 2\
**Last updated:** [December 13, 2023, 1:24am UTC](https://discourse.julialang.org/t/configurations-jl-read-vector-of-multiple-possible-types-from-toml-file/107541 "2023-12-13T01:24:24Z")

</div>

Say that I have two custom option types, TypeA and TypeB defined below: using Configurations @option "type\_a" struct TypeA type::Reflect a::Int end @option "type\_b" struct TypeB type::Reflect b::Int en…

---

## [Even more interactive REPL](https://discourse.julialang.org/t/even-more-interactive-repl/107537)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 3\
**Last updated:** [December 13, 2023, 12:06am UTC](https://discourse.julialang.org/t/even-more-interactive-repl/107537 "2023-12-13T00:06:37Z")

</div>

Hi all :slight\_smile: Just stumbled over this. How difficult is it to implement such a repl mode?

---

## [Instantiating function from type?](https://discourse.julialang.org/t/instantiating-function-from-type/107532)

<div class="topic-metadata">

**Author:** [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Replies:** 4\
**Last updated:** [December 12, 2023, 11:56pm UTC](https://discourse.julialang.org/t/instantiating-function-from-type/107532 "2023-12-12T23:56:07Z")

</div>

Given the type F of a function, is there a good/documented way to instantiate the underlying function if possible? F() doesn’t work, but I feel like it should: julia\> F = typeof(sin) typeof(sin) (singleton type of func…

---

## [Flux.update! not working with custom AbstractArray](https://discourse.julialang.org/t/flux-update-not-working-with-custom-abstractarray/107530)

<div class="topic-metadata">

**Author:** [@nelslind](https://discourse.julialang.org/u/nelslind)\
**Replies:** 1\
**Last updated:** [December 12, 2023, 11:13pm UTC](https://discourse.julialang.org/t/flux-update-not-working-with-custom-abstractarray/107530 "2023-12-12T23:13:37Z")

</div>

When building a model using custom structs that are subtypes of AbstractArray, Flux.update! cannot update the model. For my use case, it is particularly convenient to do computations using these custom structs. Is there…

---

## [Product of permutations without allocation](https://discourse.julialang.org/t/product-of-permutations-without-allocation/107366)

<div class="topic-metadata">

**Author:** [@lance\_xwq](https://discourse.julialang.org/u/lance_xwq)\
**Replies:** 11\
**Last updated:** [December 12, 2023, 10:48pm UTC](https://discourse.julialang.org/t/product-of-permutations-without-allocation/107366 "2023-12-12T22:48:15Z")

</div>

Hello, I’m trying to write a piece of code involving calculating the product of permutations, as defined here, for each column of a matrix. Here are three MWEs: function apply\_perm1!(A::AbstractMatrix{\<:Integer}, B::Ab…

---

## [ReverseDiff.jl failing with the Base.tanh function?](https://discourse.julialang.org/t/reversediff-jl-failing-with-the-base-tanh-function/107474)

<div class="topic-metadata">

**Author:** [@Alejandro\_Quiaro\_San](https://discourse.julialang.org/u/Alejandro_Quiaro_San)\
**Replies:** 5\
**Last updated:** [December 12, 2023, 9:52pm UTC](https://discourse.julialang.org/t/reversediff-jl-failing-with-the-base-tanh-function/107474 "2023-12-12T21:52:45Z")

</div>

Hello Guys, I’m trying to build a probabilistic model in Turing.jl, and it is supposed that when you change the AD backend to :reversediff you get computational improvements. I have a forward operator inside my probabil…

---

## [Direct Forward Sensitivity Analysis of ODEs in ModelingToolkit.jl for a Subset of Parameters](https://discourse.julialang.org/t/direct-forward-sensitivity-analysis-of-odes-in-modelingtoolkit-jl-for-a-subset-of-parameters/104903)

<div class="topic-metadata">

**Author:** [@Can\_Bozdogan](https://discourse.julialang.org/u/Can_Bozdogan)\
**Replies:** 4\
**Last updated:** [December 12, 2023, 10:00pm UTC](https://discourse.julialang.org/t/direct-forward-sensitivity-analysis-of-odes-in-modelingtoolkit-jl-for-a-subset-of-parameters/104903 "2023-12-12T22:00:49Z")

</div>

Hello, I am working on a project that involves setting up and solving an ODE system. I’ve defined my ODE system using ModelingToolkit.jl and not as a function. My ODE system has many parameters, and I’m interested in pe…

---

## [SW engineering books](https://discourse.julialang.org/t/sw-engineering-books/107515)

<div class="topic-metadata">

**Author:** [@gudyrmik](https://discourse.julialang.org/u/gudyrmik)\
**Replies:** 1\
**Last updated:** [December 12, 2023, 6:48pm UTC](https://discourse.julialang.org/t/sw-engineering-books/107515 "2023-12-12T18:48:39Z")

</div>

Hello everyone, could please someboby reccommend some titles about software engineering using Julia? Design patterns, writing tests (maybe TDD generally), proper architecturing in Julia, etc etc. so, everything around …

---

## [Can ModelingToolkit be used for simulating fluid flow including fluid properties?](https://discourse.julialang.org/t/can-modelingtoolkit-be-used-for-simulating-fluid-flow-including-fluid-properties/107298)

<div class="topic-metadata">

**Author:** [@NikoBiele](https://discourse.julialang.org/u/NikoBiele)\
**Replies:** 6\
**Last updated:** [December 12, 2023, 5:39pm UTC](https://discourse.julialang.org/t/can-modelingtoolkit-be-used-for-simulating-fluid-flow-including-fluid-properties/107298 "2023-12-12T17:39:56Z")

</div>

Hi all, I am huge fan of Julia, and I used it for my Master’s thesis where I made a large dynamic model of a two-stage heat pump, including all of the fluid properties (via CoolProp.jl), such as: Temperature, pressure, …

---

## [AMDGPU: Very aggressive allocation? And what tools to monitor vram usage?](https://discourse.julialang.org/t/amdgpu-very-aggressive-allocation-and-what-tools-to-monitor-vram-usage/107458)

<div class="topic-metadata">

**Author:** [@Tetrakai](https://discourse.julialang.org/u/Tetrakai)\
**Replies:** 15\
**Last updated:** [December 12, 2023, 5:22pm UTC](https://discourse.julialang.org/t/amdgpu-very-aggressive-allocation-and-what-tools-to-monitor-vram-usage/107458 "2023-12-12T17:22:35Z")

</div>

So I was able to train my first network outside of a tutorial. It was very satisfying to get the 100-1000x improvement over cpu. I tried using multiple linux tools to monitor vram (that apparently get their info from th…

---

## [Fastest Way to Carry Out Multiple Cross Products](https://discourse.julialang.org/t/fastest-way-to-carry-out-multiple-cross-products/107495)

<div class="topic-metadata">

**Author:** [@hakanc](https://discourse.julialang.org/u/hakanc)\
**Replies:** 12\
**Last updated:** [December 12, 2023, 5:02pm UTC](https://discourse.julialang.org/t/fastest-way-to-carry-out-multiple-cross-products/107495 "2023-12-12T17:02:48Z")

</div>

Hi everyone, I am moving some code from Matlab to Julia and I need to carry out a large number (N) of cross products (at least ten thousand). In Matlab, I had two 3xN matrices and I could use cross(omega,pmat) to take th…

---

## [Includes and loops](https://discourse.julialang.org/t/includes-and-loops/54752)

<div class="topic-metadata">

**Author:** [@Benoit\_Gaudeul](https://discourse.julialang.org/u/Benoit_Gaudeul)\
**Replies:** 2\
**Last updated:** [December 12, 2023, 4:56pm UTC](https://discourse.julialang.org/t/includes-and-loops/54752 "2023-12-12T16:56:46Z")

</div>

I have defined some code (generation of a mesh) in a file “mesh.jl” that I’m trying to include in an other one. The command include("mesh.jl") worked fine. To draw a convergence curve I tried to use it into a loop and ge…

---

## [Dataframe unstack() column order](https://discourse.julialang.org/t/dataframe-unstack-column-order/107481)

<div class="topic-metadata">

**Author:** [@paulmelis](https://discourse.julialang.org/u/paulmelis)\
**Replies:** 5\
**Last updated:** [December 12, 2023, 4:50pm UTC](https://discourse.julialang.org/t/dataframe-unstack-column-order/107481 "2023-12-12T16:50:06Z")

</div>

Given this dataframe holding counts of a product (actually HPC compute partition) per week: julia\> describe(df\_agg) 3×7 DataFrame Row │ variable mean min median max nmissing eltype │ Symbol …

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

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