# General Usage

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

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

**Page:** 230

---

## [Can Julia make voice synthesizer using pressure simulation?](https://discourse.julialang.org/t/can-julia-make-voice-synthesizer-using-pressure-simulation/106220)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 5\
**Last updated:** [November 15, 2023, 5:13am UTC](https://discourse.julialang.org/t/can-julia-make-voice-synthesizer-using-pressure-simulation/106220 "2023-11-15T05:13:39Z")

</div>

A good synthetic speaker could talk, sing, and perform lots of stuffs. So, the question today is… would it be possible for Julia to synthesize voice by simulating vibration or even aIr pressure? (Maybe it’s totally j…

---

## [Macro that takes a function and calls it repeatedly with different data](https://discourse.julialang.org/t/macro-that-takes-a-function-and-calls-it-repeatedly-with-different-data/106237)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 8\
**Last updated:** [November 15, 2023, 3:09am UTC](https://discourse.julialang.org/t/macro-that-takes-a-function-and-calls-it-repeatedly-with-different-data/106237 "2023-11-15T03:09:57Z")

</div>

I’m trying to write a macro that provides a convenient way for a user to compute certain measures/statistics across different levels of aggregation. For example, there are roughly 3,200 counties in the USA and we have di…

---

## [Ferrite vs Gridap](https://discourse.julialang.org/t/ferrite-vs-gridap/106186)

<div class="topic-metadata">

**Author:** [@c\_sell](https://discourse.julialang.org/u/c_sell)\
**Replies:** 3\
**Last updated:** [November 15, 2023, 12:01am UTC](https://discourse.julialang.org/t/ferrite-vs-gridap/106186 "2023-11-15T00:01:03Z")

</div>

Hello everyone, I am looking for a good Julia FEM package. I have found the Gridap and Ferrite packages. What are the pros and cons of using either of these packages? I am particularly interested in doing calculations …

---

## [Package compiler 16 kB output](https://discourse.julialang.org/t/package-compiler-16-kb-output/106229)

<div class="topic-metadata">

**Author:** [@Kruxigt](https://discourse.julialang.org/u/Kruxigt)\
**Replies:** 0\
**Last updated:** [November 14, 2023, 6:45pm UTC](https://discourse.julialang.org/t/package-compiler-16-kb-output/106229 "2023-11-14T18:45:50Z")

</div>

I recently switched from Jula v 1.10 Beta 3 to 1.10 rc1, mainly in hope to combat some problems with PackageCompiler. However, now it’s even worse. With Julia 1.10 rc1 I can’t even get any output larger than 16 kB. I.e. …

---

## [DataFrames precompilation failure](https://discourse.julialang.org/t/dataframes-precompilation-failure/106163)

<div class="topic-metadata">

**Author:** [@albrightand](https://discourse.julialang.org/u/albrightand)\
**Replies:** 7\
**Last updated:** [November 14, 2023, 4:36pm UTC](https://discourse.julialang.org/t/dataframes-precompilation-failure/106163 "2023-11-14T16:36:44Z")

</div>

Today I can’t get DataFrames.jl to pre-compile – even though I have had no issue previously. Any advice is welcome on how to fix the pre-compilation. I tried to make a whole new project with only DataFrames, so there wo…

---

## [Strange logical indexing behavior with 3-dimensional Array and BitMatrix](https://discourse.julialang.org/t/strange-logical-indexing-behavior-with-3-dimensional-array-and-bitmatrix/106221)

<div class="topic-metadata">

**Author:** [@bgroenks](https://discourse.julialang.org/u/bgroenks)\
**Replies:** 3\
**Last updated:** [November 14, 2023, 4:31pm UTC](https://discourse.julialang.org/t/strange-logical-indexing-behavior-with-3-dimensional-array-and-bitmatrix/106221 "2023-11-14T16:31:05Z")

</div>

Hi, A colleague of mine noticed something strange in the way that getindex and setindex! handle logical indexing with BitMatrix. Consider the following example: import Random X = ones(10,3,3) # Array{Float64,3} mask =…

---

## [Inconsistency between map and fmap](https://discourse.julialang.org/t/inconsistency-between-map-and-fmap/106217)

<div class="topic-metadata">

**Author:** [@FerreolS](https://discourse.julialang.org/u/FerreolS)\
**Replies:** 2\
**Last updated:** [November 14, 2023, 3:48pm UTC](https://discourse.julialang.org/t/inconsistency-between-map-and-fmap/106217 "2023-11-14T15:48:38Z")

</div>

Hi, I saw fmap as an extension of map to functors and I want to use it convert type of element of arrays that are leaves of some struct: Taking the doc example: julia\> using Functors julia\> struct Foo x …

---

## [Cannot achieve type stability](https://discourse.julialang.org/t/cannot-achieve-type-stability/106194)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 17\
**Last updated:** [November 14, 2023, 2:34pm UTC](https://discourse.julialang.org/t/cannot-achieve-type-stability/106194 "2023-11-14T14:34:01Z")

</div>

See the MWE below, inferred as Vector on both 1.9 and 1.10-pre. struct Quadrature{T} x::Vector{T} w::Vector{T} end function cubature(f::F, quadrature::Quadrature, B::NTuple{N}) where {F,N} (; x, w) = quadra…

---

## [Question about random numbers from custom distribution](https://discourse.julialang.org/t/question-about-random-numbers-from-custom-distribution/106214)

<div class="topic-metadata">

**Author:** [@mt\_86](https://discourse.julialang.org/u/mt_86)\
**Replies:** 2\
**Last updated:** [November 14, 2023, 2:18pm UTC](https://discourse.julialang.org/t/question-about-random-numbers-from-custom-distribution/106214 "2023-11-14T14:18:10Z")

</div>

Hello, I’m interested in generating random samples from a specific distribution. I read that it is useful to import the package Distributions.jl, however I’m not sure that the following distribution is included: p(j)…

---

## [Translation of traditional ML models to neural network framework for acceleration?](https://discourse.julialang.org/t/translation-of-traditional-ml-models-to-neural-network-framework-for-acceleration/105986)

<div class="topic-metadata">

**Author:** [@FredrikKarlssonSpeec](https://discourse.julialang.org/u/FredrikKarlssonSpeec)\
**Replies:** 5\
**Last updated:** [November 14, 2023, 10:52am UTC](https://discourse.julialang.org/t/translation-of-traditional-ml-models-to-neural-network-framework-for-acceleration/105986 "2023-11-14T10:52:53Z")

</div>

Hi, This is maybe a stupid question for which the answer is already in the docs of one of the ML / NN frameworks, but are there efforts within the Julia community to do what the Hummingbird python package is attempting …

---

## [Markdown tables](https://discourse.julialang.org/t/markdown-tables/11385)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 22\
**Last updated:** [November 14, 2023, 9:14am UTC](https://discourse.julialang.org/t/markdown-tables/11385 "2023-11-14T09:14:00Z")

</div>

Is anyone sitting on or thinking of building an implementation to parse arrays (e.g. Matrix, DataFrame, AbstractArray, etc.) into markdown tables (specifically one of the four table formats described in pandoc’s document…

---

## [Unicode mac windows portability](https://discourse.julialang.org/t/unicode-mac-windows-portability/106155)

<div class="topic-metadata">

**Author:** [@Gravlax](https://discourse.julialang.org/u/Gravlax)\
**Replies:** 2\
**Last updated:** [November 14, 2023, 8:04am UTC](https://discourse.julialang.org/t/unicode-mac-windows-portability/106155 "2023-11-14T08:04:36Z")

</div>

Hi all, I just had an issue during one of my lectures. I provided the students a notebook with pre-filled information. The notebook was edited on a mac using VScode jupyter editor. One variable name was called χ̇ but w…

---

## [Assignment form, where syntax, and a return type](https://discourse.julialang.org/t/assignment-form-where-syntax-and-a-return-type/106175)

<div class="topic-metadata">

**Author:** [@slawrence](https://discourse.julialang.org/u/slawrence)\
**Replies:** 7\
**Last updated:** [November 14, 2023, 2:38am UTC](https://discourse.julialang.org/t/assignment-form-where-syntax-and-a-return-type/106175 "2023-11-14T02:38:21Z")

</div>

I want to use assignment form and where syntax while specifying the return type. I can’t. Why not? (Presumably I’ve misunderstood what some syntax means.) To be concrete, here are a few function definitions that compile…

---

## [Stripping OpenBLAS from private build of Julia?](https://discourse.julialang.org/t/stripping-openblas-from-private-build-of-julia/106150)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 4\
**Last updated:** [November 13, 2023, 10:45pm UTC](https://discourse.julialang.org/t/stripping-openblas-from-private-build-of-julia/106150 "2023-11-13T22:45:37Z")

</div>

It’s well known that BLAS buffers are the largest source of RAM usage by Julia at startup. Would this problem be gone if the stdlib LinearAlgebra is not loaded at startup? I understand that changing this publicly may be …

---

## [LoadError: ArgumentError: hasproperty of NULL PyObject](https://discourse.julialang.org/t/loaderror-argumenterror-hasproperty-of-null-pyobject/105805)

<div class="topic-metadata">

**Author:** [@Students](https://discourse.julialang.org/u/Students)\
**Replies:** 3\
**Last updated:** [November 13, 2023, 7:52pm UTC](https://discourse.julialang.org/t/loaderror-argumenterror-hasproperty-of-null-pyobject/105805 "2023-11-13T19:52:20Z")

</div>

Hello, I am trying to add FLOWNoise pkg in my env however I am getting the following error: I did the following: ENV\[“PYTHON”\] = “” Pkg.build(“PyCall”) I am still getting the same error. I kindly request your hel…

---

## [Modifying TypeVar that will have a concrete value?](https://discourse.julialang.org/t/modifying-typevar-that-will-have-a-concrete-value/106149)

<div class="topic-metadata">

**Author:** [@jecs](https://discourse.julialang.org/u/jecs)\
**Replies:** 6\
**Last updated:** [November 13, 2023, 7:47pm UTC](https://discourse.julialang.org/t/modifying-typevar-that-will-have-a-concrete-value/106149 "2023-11-13T19:47:17Z")

</div>

Say I have an abstract type that is parameterized on a TypeVar that will have a concrete integer value. abstract type A{N} end I have a struct B where I’d like to subtype A but where I modify the TypeVar that is used. …

---

## [Hermitian version of three-argument dot](https://discourse.julialang.org/t/hermitian-version-of-three-argument-dot/106122)

<div class="topic-metadata">

**Author:** [@fph](https://discourse.julialang.org/u/fph)\
**Replies:** 11\
**Last updated:** [November 13, 2023, 6:51pm UTC](https://discourse.julialang.org/t/hermitian-version-of-three-argument-dot/106122 "2023-11-13T18:51:16Z")

</div>

Is there a function to compute directly v^\* A v for a vector v and a matrix A? Ideally, it should have the upsides of three-argument dot, like not allocating Av, and take advantage of symmetry, so when A is Symmetric or…

---

## [Infrastructure for SIMD random number generator](https://discourse.julialang.org/t/infrastructure-for-simd-random-number-generator/106065)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 1\
**Last updated:** [November 13, 2023, 4:04pm UTC](https://discourse.julialang.org/t/infrastructure-for-simd-random-number-generator/106065 "2023-11-13T16:04:21Z")

</div>

Imagine you want to find the average distance of two points in a disk with SIMD and without allocation, how would you do this with the current API? Let’s assume a vector length of 8 for simplicity. First, you start gen…

---

## [Using Plots in an extension causes precompile warnings and errors](https://discourse.julialang.org/t/using-plots-in-an-extension-causes-precompile-warnings-and-errors/106159)

<div class="topic-metadata">

**Author:** [@Allan\_Baker](https://discourse.julialang.org/u/Allan_Baker)\
**Replies:** 1\
**Last updated:** [November 13, 2023, 5:29pm UTC](https://discourse.julialang.org/t/using-plots-in-an-extension-causes-precompile-warnings-and-errors/106159 "2023-11-13T17:29:55Z")

</div>

In my package with multiple modules have some plot functions for some data types that I am trying to move into extensions to remove plots dependency and allow a Makie option as well. The module extensions which are base…

---

## [Performance issue with multithreaded computation with matrix operations at its heart (Threads.@threads vs. BLAS threads)](https://discourse.julialang.org/t/performance-issue-with-multithreaded-computation-with-matrix-operations-at-its-heart-threads-threads-vs-blas-threads/106043)

<div class="topic-metadata">

**Author:** [@HanD](https://discourse.julialang.org/u/HanD)\
**Replies:** 7\
**Last updated:** [November 13, 2023, 5:00pm UTC](https://discourse.julialang.org/t/performance-issue-with-multithreaded-computation-with-matrix-operations-at-its-heart-threads-threads-vs-blas-threads/106043 "2023-11-13T17:00:05Z")

</div>

While trying to speed up a long computation with chunking more threads on it, I ran into an interesting problem. I found several related threads here, but I couldn’t find a convincing answer, nor a solution to my issue. …

---

## [Optimizing dynamical system in a network](https://discourse.julialang.org/t/optimizing-dynamical-system-in-a-network/106034)

<div class="topic-metadata">

**Author:** [@VictorSeven](https://discourse.julialang.org/u/VictorSeven)\
**Replies:** 15\
**Last updated:** [November 13, 2023, 1:35pm UTC](https://discourse.julialang.org/t/optimizing-dynamical-system-in-a-network/106034 "2023-11-13T13:35:02Z")

</div>

Hi, I am trying to integrate a simple dynamical system on a network, which is represented by an adjacency matrix. Note that the network in this case is dense and hence I am using the full matrix for it. Initially I wrot…

---

## [Using Julia to connect to local LLMs](https://discourse.julialang.org/t/using-julia-to-connect-to-local-llms/106137)

<div class="topic-metadata">

**Author:** [@rcheruku](https://discourse.julialang.org/u/rcheruku)\
**Replies:** 0\
**Last updated:** [November 13, 2023, 5:48am UTC](https://discourse.julialang.org/t/using-julia-to-connect-to-local-llms/106137 "2023-11-13T05:48:46Z")

</div>

I found very few examples so far, on the web, so created couple of examples: one for Ollama ( you can download supported HF LLMs on to your Mac/Linux and use it ) Here is the example:

---

## [How to properly import a macro inside a begin-end block](https://discourse.julialang.org/t/how-to-properly-import-a-macro-inside-a-begin-end-block/106037)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 6\
**Last updated:** [November 12, 2023, 7:09pm UTC](https://discourse.julialang.org/t/how-to-properly-import-a-macro-inside-a-begin-end-block/106037 "2023-11-12T19:09:42Z")

</div>

Hi there, I am very surprised that the following fails in Julia 1.9 julia\> begin import Crayons: Crayon, @crayon\_str f() = crayon"dark\_gray" end ERROR: UndefVarError: \`@crayon\_str\` not defin…

---

## [Static Arrays Memory & Allocations](https://discourse.julialang.org/t/static-arrays-memory-allocations/106110)

<div class="topic-metadata">

**Author:** [@Domenico\_Lahaye](https://discourse.julialang.org/u/Domenico_Lahaye)\
**Replies:** 15\
**Last updated:** [November 12, 2023, 6:56pm UTC](https://discourse.julialang.org/t/static-arrays-memory-allocations/106110 "2023-11-12T18:56:15Z")

</div>

Below two functions function generateLocalMatrixWorks(element::Element) h = element.area Iloc = SVector(element.e1, element.e1, element.e2, element.e2) Jloc = SVector(element.e1, element.e2, element.e1, elemen…

---

## [Multiple files in GameZero](https://discourse.julialang.org/t/multiple-files-in-gamezero/106109)

<div class="topic-metadata">

**Author:** [@CallError](https://discourse.julialang.org/u/CallError)\
**Replies:** 2\
**Last updated:** [November 12, 2023, 1:42pm UTC](https://discourse.julialang.org/t/multiple-files-in-gamezero/106109 "2023-11-12T13:42:53Z")

</div>

My game project is becoming bigger, so I got to split it different files. But as soon as I use the rungame("filename.fl") command, I am getting an error message for the usage of include. Is there a way to work with mult…

---

## [Wrapping LAPACK functions using MKL](https://discourse.julialang.org/t/wrapping-lapack-functions-using-mkl/105997)

<div class="topic-metadata">

**Author:** [@andreasvarga](https://discourse.julialang.org/u/andreasvarga)\
**Replies:** 7\
**Last updated:** [November 12, 2023, 5:30am UTC](https://discourse.julialang.org/t/wrapping-lapack-functions-using-mkl/105997 "2023-11-12T05:30:47Z")

</div>

The following implements a wrapper to the LAPACK functions dlanv2/slanv2: import LinearAlgebra.BLAS.@blasfunc using LinearAlgebra import LinearAlgebra: libblastrampoline, BlasFloat, BlasReal, BlasComplex, BlasInt con…

---

## [Nonlinear reduced chi-square fit with error erstimates and correlation matrix](https://discourse.julialang.org/t/nonlinear-reduced-chi-square-fit-with-error-erstimates-and-correlation-matrix/106024)

<div class="topic-metadata">

**Author:** [@physh](https://discourse.julialang.org/u/physh)\
**Replies:** 2\
**Last updated:** [November 12, 2023, 5:24am UTC](https://discourse.julialang.org/t/nonlinear-reduced-chi-square-fit-with-error-erstimates-and-correlation-matrix/106024 "2023-11-12T05:24:38Z")

</div>

Hi all, I have a nonlinear function function model(params, args) # params define a matrix which is then diagonalized # output are eigenvalues and some function of the eigenvectors return out1, out2 # both outputs out1,…

---

## [Matplotlib CondaPkg QT](https://discourse.julialang.org/t/matplotlib-condapkg-qt/106086)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 0\
**Last updated:** [November 11, 2023, 6:49pm UTC](https://discourse.julialang.org/t/matplotlib-condapkg-qt/106086 "2023-11-11T18:49:46Z")

</div>

I would like to use PyPlot with the QT backend. But I am not able to install QT using CondaPkg. Any idea how to do this?

---

## [Widening the element type of an array?](https://discourse.julialang.org/t/widening-the-element-type-of-an-array/106085)

<div class="topic-metadata">

**Author:** [@ffevotte](https://discourse.julialang.org/u/ffevotte)\
**Replies:** 2\
**Last updated:** [November 11, 2023, 6:11pm UTC](https://discourse.julialang.org/t/widening-the-element-type-of-an-array/106085 "2023-11-11T18:11:26Z")

</div>

This may be a rather unusual question but: I’d like to “widen” the element type of a given Array to an abstract type, such that the resulting array contains the same data as the original, but can store values of another …

---

## [Julia 1.10-rc1 gives a huge speed-up over Julia 1.9](https://discourse.julialang.org/t/julia-1-10-rc1-gives-a-huge-speed-up-over-julia-1-9/106072)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 4\
**Last updated:** [November 11, 2023, 3:30pm UTC](https://discourse.julialang.org/t/julia-1-10-rc1-gives-a-huge-speed-up-over-julia-1-9/106072 "2023-11-11T15:30:50Z")

</div>

I am running 400 simulations, based on ModelingToolkit, each 11h of real-time. With Julia 1.9, launching Julia with: julia --project -i -q -t 16 it takes 44 s (second run). With Julia 1.10-rc1, launching Julia with: …

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

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