# General Usage

**URL:** https://discourse.julialang.org/c/usage/6.md?page=170

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

**Page:** 171

---

## [Why is flux model slower than python?](https://discourse.julialang.org/t/why-is-flux-model-slower-than-python/54154)

<div class="topic-metadata">

**Author:** [@mdsa3d](https://discourse.julialang.org/u/mdsa3d)\
**Replies:** 6\
**Last updated:** [May 11, 2024, 2:50pm UTC](https://discourse.julialang.org/t/why-is-flux-model-slower-than-python/54154 "2024-05-11T14:50:44Z")

</div>

I ran a benchmark test to observe the performance gain using flux. But, rather I observed that the flux runtine is longer than python equivalent. However, the julia is supposed to be faster. May I know, what am I doing …

---

## [Example of GLMakie sharing GLFW/OpenGL context (for example with CImGui)?](https://discourse.julialang.org/t/example-of-glmakie-sharing-glfw-opengl-context-for-example-with-cimgui/114108)

<div class="topic-metadata">

**Author:** [@Benoit9](https://discourse.julialang.org/u/Benoit9)\
**Replies:** 3\
**Last updated:** [May 11, 2024, 2:06pm UTC](https://discourse.julialang.org/t/example-of-glmakie-sharing-glfw-opengl-context-for-example-with-cimgui/114108 "2024-05-11T14:06:05Z")

</div>

I found an example from 2020 in this thread Is it possible to use Makie in CImGui? here: Modification of Gnimuc's example: https://gist.github.com/Gnimuc/5a1e4942784cfc3558e2ee50b7bee84d · GitHub But Makie has changed q…

---

## [Why does an iterator with a vector as state variable allocate?](https://discourse.julialang.org/t/why-does-an-iterator-with-a-vector-as-state-variable-allocate/114128)

<div class="topic-metadata">

**Author:** [@matthias314](https://discourse.julialang.org/u/matthias314)\
**Replies:** 8\
**Last updated:** [May 11, 2024, 1:22pm UTC](https://discourse.julialang.org/t/why-does-an-iterator-with-a-vector-as-state-variable-allocate/114128 "2024-05-11T13:22:24Z")

</div>

Here is an example of a phenomenon that I have noticed more than once: The following type C uses a Vector as state variable for iterate. This of course needs one allocation at the beginning of the iteration. However, the…

---

## [Is MKL performance on AMD no longer crippled?](https://discourse.julialang.org/t/is-mkl-performance-on-amd-no-longer-crippled/114069)

<div class="topic-metadata">

**Author:** [@meisel](https://discourse.julialang.org/u/meisel)\
**Replies:** 4\
**Last updated:** [May 11, 2024, 8:34am UTC](https://discourse.julialang.org/t/is-mkl-performance-on-amd-no-longer-crippled/114069 "2024-05-11T08:34:19Z")

</div>

I recently tried MKL 2024.1 on an AMD cloud instance (1 vCPU on top of a 4th gen AMD EPYC CPU), and found it to have very reasonable performance. In fact, it was better than another matmul library I tried. Has Intel fina…

---

## [Isn't it very unintuitive that \`cholesky()\` stores data in the \*upper\* triangular part?](https://discourse.julialang.org/t/isnt-it-very-unintuitive-that-cholesky-stores-data-in-the-upper-triangular-part/114123)

<div class="topic-metadata">

**Author:** [@biona001](https://discourse.julialang.org/u/biona001)\
**Replies:** 3\
**Last updated:** [May 11, 2024, 7:15am UTC](https://discourse.julialang.org/t/isnt-it-very-unintuitive-that-cholesky-stores-data-in-the-upper-triangular-part/114123 "2024-05-11T07:15:07Z")

</div>

A cholesky factor for a symmetric matrix A is usually described as a lower triangular matrix L such that A = LL'. But in Julia, the actual numerical value of L is stored in the upper triangular portion of cholesky(A).fac…

---

## [How to test what happens in a function deep in the call stack](https://discourse.julialang.org/t/how-to-test-what-happens-in-a-function-deep-in-the-call-stack/114120)

<div class="topic-metadata">

**Author:** [@jules](https://discourse.julialang.org/u/jules)\
**Replies:** 3\
**Last updated:** [May 10, 2024, 9:20pm UTC](https://discourse.julialang.org/t/how-to-test-what-happens-in-a-function-deep-in-the-call-stack/114120 "2024-05-10T21:20:30Z")

</div>

I was wondering how I could improve tests for certain packages of mine, let’s take Makie as an example. Makie turns input data to output images but only testing reference images is not satisfactory. We have lots of inter…

---

## [Fastest way to save a large number of DataFrames to disk](https://discourse.julialang.org/t/fastest-way-to-save-a-large-number-of-dataframes-to-disk/114005)

<div class="topic-metadata">

**Author:** [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)\
**Replies:** 2\
**Last updated:** [May 10, 2024, 12:07pm UTC](https://discourse.julialang.org/t/fastest-way-to-save-a-large-number-of-dataframes-to-disk/114005 "2024-05-10T12:07:51Z")

</div>

I have a large number of dataframes generated from other sources like using DataFrames N = 1000 df\_dict = Dict(1:N .=\> \[DataFrame(rand(rand(1000:2000), 146), :auto) for \_ in 1:N\]) I’d like to save them into a single fi…

---

## [How to get the loss value from FluxTraining](https://discourse.julialang.org/t/how-to-get-the-loss-value-from-fluxtraining/114118)

<div class="topic-metadata">

**Author:** [@cirobr](https://discourse.julialang.org/u/cirobr)\
**Replies:** 0\
**Last updated:** [May 10, 2024, 5:44pm UTC](https://discourse.julialang.org/t/how-to-get-the-loss-value-from-fluxtraining/114118 "2024-05-10T17:44:36Z")

</div>

Cheers, In FluxTraining.jl, may I please ask how do we get the calculated loss value after executing one epoch with the below instruction? epoch!(learner, ValidationPhase(), validset) Thanks!

---

## [How to verify the compatibility under different Julia versions for a package that is in development?](https://discourse.julialang.org/t/how-to-verify-the-compatibility-under-different-julia-versions-for-a-package-that-is-in-development/114096)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 8\
**Last updated:** [May 10, 2024, 5:27pm UTC](https://discourse.julialang.org/t/how-to-verify-the-compatibility-under-different-julia-versions-for-a-package-that-is-in-development/114096 "2024-05-10T17:27:22Z")

</div>

When developing a package, one has responsibility to check its compatibility under different Julia versions (6. Compatibility · Pkg.jl (julialang.org)). But how to implement this? Specifically, MyPackage.jl was created …

---

## [Technical term for "operator inference" related to multiple dispatch](https://discourse.julialang.org/t/technical-term-for-operator-inference-related-to-multiple-dispatch/114109)

<div class="topic-metadata">

**Author:** [@younes](https://discourse.julialang.org/u/younes)\
**Replies:** 5\
**Last updated:** [May 10, 2024, 5:19pm UTC](https://discourse.julialang.org/t/technical-term-for-operator-inference-related-to-multiple-dispatch/114109 "2024-05-10T17:19:45Z")

</div>

I have defined the operator \< for my custom type Person: begin struct Person name::String age::Int end import Base: \< function \<(a::Person, b::Person)::Bool return a.age \< b.age end # Example …

---

## [Scope of module docstring](https://discourse.julialang.org/t/scope-of-module-docstring/114085)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 5\
**Last updated:** [May 10, 2024, 12:13pm UTC](https://discourse.julialang.org/t/scope-of-module-docstring/114085 "2024-05-10T12:13:54Z")

</div>

Why does the following work? """ $(EXPORTS) """ module Foo using DocStringExtensions export bar bar() = 1 end Specifically, is the module docstring somehow scoped within the module, so that EXPORTS works? I suspect th…

---

## [Refactoring Julia Modules for Shape Representation and Canvas Drawing](https://discourse.julialang.org/t/refactoring-julia-modules-for-shape-representation-and-canvas-drawing/114095)

<div class="topic-metadata">

**Author:** [@Akhil\_Akkapelli](https://discourse.julialang.org/u/Akhil_Akkapelli)\
**Replies:** 1\
**Last updated:** [May 10, 2024, 11:21am UTC](https://discourse.julialang.org/t/refactoring-julia-modules-for-shape-representation-and-canvas-drawing/114095 "2024-05-10T11:21:53Z")

</div>

I have two Julia modules, “Shape.jl” and “Canvas.jl”, which define shapes and a canvas for drawing them. The code works as intended, but I’m wondering if there’s a cleaner and more efficient way to structure these module…

---

## [How often do you upgrade to a new version Julia?](https://discourse.julialang.org/t/how-often-do-you-upgrade-to-a-new-version-julia/114086)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 5\
**Last updated:** [May 10, 2024, 10:37am UTC](https://discourse.julialang.org/t/how-often-do-you-upgrade-to-a-new-version-julia/114086 "2024-05-10T10:37:13Z")

</div>

Will you upgrade as soon as the new version is released?

---

## [Curvefit using nonlinearsolve](https://discourse.julialang.org/t/curvefit-using-nonlinearsolve/114076)

<div class="topic-metadata">

**Author:** [@Stephen](https://discourse.julialang.org/u/Stephen)\
**Replies:** 2\
**Last updated:** [May 10, 2024, 8:29am UTC](https://discourse.julialang.org/t/curvefit-using-nonlinearsolve/114076 "2024-05-10T08:29:01Z")

</div>

Com-langmuir model: qi = Hi \* Ci / (1 + Σ(bi \* Ci) i = 2, q and C was obtained from experiment, here is the data df: Column 1 Column 2 Column 3 Column 4 C\_EA C\_EC q\_EA\_303K q\_EC\_303K 3.46 0.34 7 0.51 5.19 0…

---

## [Can I speed up this recursive set implementation?](https://discourse.julialang.org/t/can-i-speed-up-this-recursive-set-implementation/113917)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 38\
**Last updated:** [May 10, 2024, 7:37am UTC](https://discourse.julialang.org/t/can-i-speed-up-this-recursive-set-implementation/113917 "2024-05-10T07:37:37Z")

</div>

Hey there! I come to you with another performance nerdsnipe, whose solution could have a big impact on the autodiff ecosystem (via SparseConnectivityTracer.jl and DifferentiationInterface.jl). You may remember my first…

---

## [Tuple to DateTime](https://discourse.julialang.org/t/tuple-to-datetime/114066)

<div class="topic-metadata">

**Author:** [@DTL](https://discourse.julialang.org/u/DTL)\
**Replies:** 4\
**Last updated:** [May 10, 2024, 6:27am UTC](https://discourse.julialang.org/t/tuple-to-datetime/114066 "2024-05-10T06:27:50Z")

</div>

I’m processing a CSV file where I have a couple of years of recordings, there are several readings per hour, and I’m summing them altogether to get a total per day. I get the data into a dataframe ok. julia\> df 32047×…

---

## [Constrained SINDy](https://discourse.julialang.org/t/constrained-sindy/83105)

<div class="topic-metadata">

**Author:** [@ccccc](https://discourse.julialang.org/u/ccccc)\
**Replies:** 8\
**Last updated:** [May 10, 2024, 5:34am UTC](https://discourse.julialang.org/t/constrained-sindy/83105 "2024-05-10T05:34:07Z")

</div>

I know many of the differential equations in a DAE already, and I’m trying to identify the others, using DataDrivenDiffEq. I’m not sure how to constrain the model so that it doesn’t search for all of the equations. Does …

---

## [How to nest any number of for loops](https://discourse.julialang.org/t/how-to-nest-any-number-of-for-loops/114067)

<div class="topic-metadata">

**Author:** [@Marco-Congedo](https://discourse.julialang.org/u/Marco-Congedo)\
**Replies:** 8\
**Last updated:** [May 9, 2024, 10:14pm UTC](https://discourse.julialang.org/t/how-to-nest-any-number-of-for-loops/114067 "2024-05-09T22:14:32Z")

</div>

I need to iterate over all combinations of k permutations of integers (1:n). Say, k=2 and n=2. The permutations of (1:2) are \[1, 2\] \[2, 1\] and what i need is \[1, 2\] , \[1, 2\] \[1, 2\] , \[2, 1\] \[2, 1\] , \[1, 2\] \[2, 1…

---

## [How to read a parquet file applying a filter?](https://discourse.julialang.org/t/how-to-read-a-parquet-file-applying-a-filter/113982)

<div class="topic-metadata">

**Author:** [@laygr](https://discourse.julialang.org/u/laygr)\
**Replies:** 4\
**Last updated:** [May 9, 2024, 7:12pm UTC](https://discourse.julialang.org/t/how-to-read-a-parquet-file-applying-a-filter/113982 "2024-05-09T19:12:59Z")

</div>

In python, we can do: import pyarrow.parquet as pq filter = ('some\_column', '=', 'some\_value') pq.read\_table(file\_path, filters=\[filter\]).to\_pandas() How can I apply a filter similarly when reading a parquet file in Ju…

---

## [How to import data from MATLAB \`.mat\` files?](https://discourse.julialang.org/t/how-to-import-data-from-matlab-mat-files/114059)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 3\
**Last updated:** [May 9, 2024, 3:35pm UTC](https://discourse.julialang.org/t/how-to-import-data-from-matlab-mat-files/114059 "2024-05-09T15:35:10Z")

</div>

Can Julia import data from .mat files directly?

---

## [DataFrames :auto argument no longer seems to work](https://discourse.julialang.org/t/dataframes-auto-argument-no-longer-seems-to-work/113920)

<div class="topic-metadata">

**Author:** [@alan](https://discourse.julialang.org/u/alan)\
**Replies:** 7\
**Last updated:** [May 9, 2024, 3:00pm UTC](https://discourse.julialang.org/t/dataframes-auto-argument-no-longer-seems-to-work/113920 "2024-05-09T15:00:25Z")

</div>

Has :auto been removed as an argument to DataFrame? It no longer seems to work: \> DataFrame(\[1 2; 3 4\], :auto) ERROR: MethodError: no method matching DataFrame(::Matrix{Int64}, ::Symbol) Closest candidates are: DataF…

---

## [Makie, make axes invisible?](https://discourse.julialang.org/t/makie-make-axes-invisible/20796)

<div class="topic-metadata">

**Author:** [@hhaensel](https://discourse.julialang.org/u/hhaensel)\
**Replies:** 14\
**Last updated:** [May 9, 2024, 1:11pm UTC](https://discourse.julialang.org/t/makie-make-axes-invisible/20796 "2024-05-09T13:11:43Z")

</div>

I really enjoy the fastness of Makie! I think it can really become the next generation plotting tool for Julia. Currently I am struggelling with the axis interface. Is there any convenient possibility to make the axes …

---

## [Acceleration of Intel MKL on AMD Ryzen CPU's](https://discourse.julialang.org/t/acceleration-of-intel-mkl-on-amd-ryzen-cpus/31287)

<div class="topic-metadata">

**Author:** [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Replies:** 34\
**Last updated:** [May 9, 2024, 12:07pm UTC](https://discourse.julialang.org/t/acceleration-of-intel-mkl-on-amd-ryzen-cpus/31287 "2024-05-09T12:07:11Z")

</div>

Some of us use Intel MKL with Julia for improved performance. Intel MKL is composed of few code paths for different features of the CPU (SSE2, SSE4, AVX2, AVX512, etc…). One of the issues of MKL is it discriminate non …

---

## [Efficient weighted sum for arbitrary data types](https://discourse.julialang.org/t/efficient-weighted-sum-for-arbitrary-data-types/113992)

<div class="topic-metadata">

**Author:** [@baxmittens](https://discourse.julialang.org/u/baxmittens)\
**Replies:** 7\
**Last updated:** [May 9, 2024, 11:26am UTC](https://discourse.julialang.org/t/efficient-weighted-sum-for-arbitrary-data-types/113992 "2024-05-09T11:26:58Z")

</div>

Hello all, I have some old Julia code, e.g., DistributedSparseGrids.jl, written in 2016, which uses in-place math operations on custom data types implemented by proprietary in-place operator functions. The task I alw…

---

## [Laplacian for a minimized function](https://discourse.julialang.org/t/laplacian-for-a-minimized-function/103836)

<div class="topic-metadata">

**Author:** [@yosuga](https://discourse.julialang.org/u/yosuga)\
**Replies:** 10\
**Last updated:** [May 9, 2024, 7:36am UTC](https://discourse.julialang.org/t/laplacian-for-a-minimized-function/103836 "2024-05-09T07:36:15Z")

</div>

I’m trying to evaluate the following laplacian(b). using Optim using ForwardDiff function f(a,b) sin(a\[1\])\*(cos(a\[2\]) + cos(b\[1\]+b\[2\])) end function g(b) h(a) = f(a,b) res = optimize(h,zeros(2)) return…

---

## [Adding julia to webots supported languages](https://discourse.julialang.org/t/adding-julia-to-webots-supported-languages/74419)

<div class="topic-metadata">

**Author:** [@kobied](https://discourse.julialang.org/u/kobied)\
**Replies:** 1\
**Last updated:** [May 8, 2024, 8:39pm UTC](https://discourse.julialang.org/t/adding-julia-to-webots-supported-languages/74419 "2024-05-08T20:39:46Z")

</div>

Hello, as from 2019 webots, which is a robotic simulation sofware, has become open source. Today webots supports C, C++, python and matlab languages. I think that it’ll be greate if Julia will be added to the supporte…

---

## [ERROR: LoadError: PCRE JIT error: no more memory](https://discourse.julialang.org/t/error-loaderror-pcre-jit-error-no-more-memory/113859)

<div class="topic-metadata">

**Author:** [@TimG](https://discourse.julialang.org/u/TimG)\
**Replies:** 4\
**Last updated:** [May 8, 2024, 6:58pm UTC](https://discourse.julialang.org/t/error-loaderror-pcre-jit-error-no-more-memory/113859 "2024-05-08T18:58:08Z")

</div>

I’m encountering this error and as far as I can tell it is related to my use of a regular expression. I’m using proprietary commercial data, so can’t easily share. However, I’m trying to read a set of files from a very …

---

## [Writing Arrow files by column](https://discourse.julialang.org/t/writing-arrow-files-by-column/113955)

<div class="topic-metadata">

**Author:** [@djholiver](https://discourse.julialang.org/u/djholiver)\
**Replies:** 1\
**Last updated:** [May 8, 2024, 2:54pm UTC](https://discourse.julialang.org/t/writing-arrow-files-by-column/113955 "2024-05-08T14:54:04Z")

</div>

Hi, It appears (and I have observed) that Arrow.jl requires the entire data to be held in memory before flushing to disk. This is prohibitively big for my use case (500GB+) and the use of Chained Vectors for batch writi…

---

## [MATLAB.jl crashing in Julia 1.10 for MATLAB later than 2021a (according to issue)](https://discourse.julialang.org/t/matlab-jl-crashing-in-julia-1-10-for-matlab-later-than-2021a-according-to-issue/113998)

<div class="topic-metadata">

**Author:** [@Allan\_Baker](https://discourse.julialang.org/u/Allan_Baker)\
**Replies:** 0\
**Last updated:** [May 8, 2024, 1:02pm UTC](https://discourse.julialang.org/t/matlab-jl-crashing-in-julia-1-10-for-matlab-later-than-2021a-according-to-issue/113998 "2024-05-08T13:02:14Z")

</div>

Any thoughts on why the issue described below is happening or what can be done to fix it for the current versions? I’m getting the julia crash out when trying mat"version" MATLAB.jl fails to run in Julia 1.10 for versi…

---

## [Is it possible to do basic Julia algebraic operations via juliacall?](https://discourse.julialang.org/t/is-it-possible-to-do-basic-julia-algebraic-operations-via-juliacall/113973)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 4\
**Last updated:** [May 8, 2024, 11:30am UTC](https://discourse.julialang.org/t/is-it-possible-to-do-basic-julia-algebraic-operations-via-juliacall/113973 "2024-05-08T11:30:26Z")

</div>

In Julia I’ve extend the basic operations (+,-,\*,/,…) to operate on GMT types. That allow for example to do: julia\> G = peaks() A GMTgrid object with 1 layers of type Float32 Gridline node registration used x\_min: -3.0 …

[Previous page](https://discourse.julialang.org/c/usage/6.md?page=169)

[Next page](https://discourse.julialang.org/c/usage/6.md?page=171)
