# General Usage

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

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

**Page:** 227

---

## [Accelerating linear algebra code and getting different results](https://discourse.julialang.org/t/accelerating-linear-algebra-code-and-getting-different-results/106634)

<div class="topic-metadata">

**Author:** [@Leticia-maria](https://discourse.julialang.org/u/Leticia-maria)\
**Replies:** 5\
**Last updated:** [November 24, 2023, 3:58pm UTC](https://discourse.julialang.org/t/accelerating-linear-algebra-code-and-getting-different-results/106634 "2023-11-24T15:58:55Z")

</div>

Hello, so, I have been trying accelerating this function called overlap by using broadcasting and dot notation instead of unpacking matrices elements using for loops. However, I am getting different results when I do tha…

---

## [Documentation needs to be more discoverable and explorable](https://discourse.julialang.org/t/documentation-needs-to-be-more-discoverable-and-explorable/106549)

<div class="topic-metadata">

**Author:** [@devel-chm](https://discourse.julialang.org/u/devel-chm)\
**Replies:** 24\
**Last updated:** [November 24, 2023, 4:27pm UTC](https://discourse.julialang.org/t/documentation-needs-to-be-more-discoverable-and-explorable/106549 "2023-11-24T16:27:56Z")

</div>

I think that Julia documentation needs to be more “discoverable” or at least “explorable”. I would like to have a local, searchable set of documentation that you could install for the local Julia covering all install…

---

## [Downloads.download (in PlotlyLight) failing for github plotly.js repository](https://discourse.julialang.org/t/downloads-download-in-plotlylight-failing-for-github-plotly-js-repository/106226)

<div class="topic-metadata">

**Author:** [@Titas22](https://discourse.julialang.org/u/Titas22)\
**Replies:** 6\
**Last updated:** [November 24, 2023, 3:42pm UTC](https://discourse.julialang.org/t/downloads-download-in-plotlylight-failing-for-github-plotly-js-repository/106226 "2023-11-24T15:42:50Z")

</div>

Hi, I’m having issues with using PlotlyLight.jl and tracked down the issue to the following call: Downloads.download("https://github.com/plotly/plotly.js/releases/latest") I end up getting the following error: julia\>…

---

## [Change Activation Function in ELM.jl (Extreme Learning Machines)?](https://discourse.julialang.org/t/change-activation-function-in-elm-jl-extreme-learning-machines/46557)

<div class="topic-metadata">

**Author:** [@compleat](https://discourse.julialang.org/u/compleat)\
**Replies:** 10\
**Last updated:** [November 24, 2023, 11:50am UTC](https://discourse.julialang.org/t/change-activation-function-in-elm-jl-extreme-learning-machines/46557 "2023-11-24T11:50:32Z")

</div>

Hi. The ELM.jl implementation of Extreme Machine Learning looks fun and the single example given on Github looks simple enough. Is there any other documentation on how to use activation functions other than sigmoid, or …

---

## [Using inequalities in a polynomial system in Groebner.jl](https://discourse.julialang.org/t/using-inequalities-in-a-polynomial-system-in-groebner-jl/106651)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 3\
**Last updated:** [November 24, 2023, 11:19am UTC](https://discourse.julialang.org/t/using-inequalities-in-a-polynomial-system-in-groebner-jl/106651 "2023-11-24T11:19:39Z")

</div>

Groebner.jl is useful for solving a system of polynomial equations. This is about a method of transforming an inequality into an equation, so it could be used with Groebner.jl. Suppose, for example, I have this simple e…

---

## [Failure to Precompile Plots](https://discourse.julialang.org/t/failure-to-precompile-plots/106563)

<div class="topic-metadata">

**Author:** [@AlexanderNenninger](https://discourse.julialang.org/u/AlexanderNenninger)\
**Replies:** 11\
**Last updated:** [November 24, 2023, 10:30am UTC](https://discourse.julialang.org/t/failure-to-precompile-plots/106563 "2023-11-24T10:30:09Z")

</div>

Somehow my Plots installation is broken and I can’t figure out what’s going on. Plots compiles fine in my base environment, but if I switch to my project environment, it fails to precompile with the stack trace using Pl…

---

## [JET \`report\_call\` error on array.jl for \`iterate(::DataType)\` using \`typeof\`](https://discourse.julialang.org/t/jet-report-call-error-on-array-jl-for-iterate-datatype-using-typeof/106670)

<div class="topic-metadata">

**Author:** [@filchristou](https://discourse.julialang.org/u/filchristou)\
**Replies:** 0\
**Last updated:** [November 24, 2023, 9:55am UTC](https://discourse.julialang.org/t/jet-report-call-error-on-array-jl-for-iterate-datatype-using-typeof/106670 "2023-11-24T09:55:57Z")

</div>

I define the following function, which seems pretty robust to me myf(vs::Vector{N}) where {N\<:Number} = \[typeof(v) for v in vs\] But, using JET, I get a possible error julia\> JET.report\_call(myf) ═════ 1 possible erro…

---

## [Copying mutable structs without using deepcopy()](https://discourse.julialang.org/t/copying-mutable-structs-without-using-deepcopy/106648)

<div class="topic-metadata">

**Author:** [@rolim.gustavo](https://discourse.julialang.org/u/rolim.gustavo)\
**Replies:** 4\
**Last updated:** [November 24, 2023, 8:37am UTC](https://discourse.julialang.org/t/copying-mutable-structs-without-using-deepcopy/106648 "2023-11-24T08:37:30Z")

</div>

Dear colleagues, I am working on an optimization problem where I have to group a permutation of jobs, which have some characteristics. A solution to this problem can be easily represented as a vector of vectors of a typ…

---

## [How to force a predicted Flux model to give output numbers \> 0](https://discourse.julialang.org/t/how-to-force-a-predicted-flux-model-to-give-output-numbers-0/106623)

<div class="topic-metadata">

**Author:** [@EL-Bakkali-Jaafar](https://discourse.julialang.org/u/EL-Bakkali-Jaafar)\
**Replies:** 2\
**Last updated:** [November 24, 2023, 8:21am UTC](https://discourse.julialang.org/t/how-to-force-a-predicted-flux-model-to-give-output-numbers-0/106623 "2023-11-24T08:21:49Z")

</div>

Hi everybody, I have some inputs and outputs data for training a model using Flux package. These data by nature should be strictly positive.The training phase was done successfully however when I am trying to check it v…

---

## [Automatic documentation of entire package](https://discourse.julialang.org/t/automatic-documentation-of-entire-package/106616)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 1\
**Last updated:** [November 23, 2023, 8:52am UTC](https://discourse.julialang.org/t/automatic-documentation-of-entire-package/106616 "2023-11-23T08:52:50Z")

</div>

Can Documenter.jl automatically generate documentation for an entire package by collecting all docstrings from all source files, instead of just the functions specified by the user in index.md?

---

## [Parametric Types - am I using correctly](https://discourse.julialang.org/t/parametric-types-am-i-using-correctly/106342)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 5\
**Last updated:** [November 24, 2023, 1:13am UTC](https://discourse.julialang.org/t/parametric-types-am-i-using-correctly/106342 "2023-11-24T01:13:32Z")

</div>

Wanted to check I’m using parametric types as intended. Two examples below comparing parametric types to using @match macro. I think parametric types are better but the macro does isolate the core logic nicely eg. :l…

---

## [Storing a batch of sparse matrices and multiplying them to a vector](https://discourse.julialang.org/t/storing-a-batch-of-sparse-matrices-and-multiplying-them-to-a-vector/106646)

<div class="topic-metadata">

**Author:** [@eveningsilverfox](https://discourse.julialang.org/u/eveningsilverfox)\
**Replies:** 1\
**Last updated:** [November 24, 2023, 1:07am UTC](https://discourse.julialang.org/t/storing-a-batch-of-sparse-matrices-and-multiplying-them-to-a-vector/106646 "2023-11-24T01:07:07Z")

</div>

I store N matrices, each of size(n,n), in the array Batchm = zeros(ComplexF64, N,n,n ). Later, I retrieve the individual matrices and multiply to a vector, Batchm(index, :,:)\*v. The matrices are sparse and banded. What’…

---

## [Defining multiple modules in a package](https://discourse.julialang.org/t/defining-multiple-modules-in-a-package/52702)

<div class="topic-metadata">

**Author:** [@GlenHenshaw](https://discourse.julialang.org/u/GlenHenshaw)\
**Replies:** 19\
**Last updated:** [November 24, 2023, 12:45am UTC](https://discourse.julialang.org/t/defining-multiple-modules-in-a-package/52702 "2023-11-24T00:45:16Z")

</div>

I am developing two packages. Let’s call them “A” and “B”. Package “A” defines several modules, let’s call them “d”, “e”, and “f”. I have activated environment B from Pkg and made package A a dependency. A.jl: module A…

---

## [Inconsistencies in the number of lines in a CSV file](https://discourse.julialang.org/t/inconsistencies-in-the-number-of-lines-in-a-csv-file/106576)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 3\
**Last updated:** [November 23, 2023, 8:56pm UTC](https://discourse.julialang.org/t/inconsistencies-in-the-number-of-lines-in-a-csv-file/106576 "2023-11-23T20:56:19Z")

</div>

I had some adventures in reading a CSV file created on a windows computer in Julia, and it as left me with some confusion on what counts as a line. In particular, it sees like CSV.jl and readlines have different opinions…

---

## [Optimizing Direct 2D Convolution Code](https://discourse.julialang.org/t/optimizing-direct-2d-convolution-code/106598)

<div class="topic-metadata">

**Author:** [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Replies:** 14\
**Last updated:** [November 23, 2023, 8:48pm UTC](https://discourse.julialang.org/t/optimizing-direct-2d-convolution-code/106598 "2023-11-23T20:48:40Z")

</div>

I have implemented 2D convolution using direct calculation: using BenchmarkTools; function \_Conv2D!( mO :: Matrix{T}, mI :: Matrix{T}, mK :: Matrix{T} ) where {T \<: AbstractFloat} numRowsI, numColsI = size(mI); …

---

## [Run parrallel computing code](https://discourse.julialang.org/t/run-parrallel-computing-code/106645)

<div class="topic-metadata">

**Author:** [@Somali10](https://discourse.julialang.org/u/Somali10)\
**Replies:** 10\
**Last updated:** [November 23, 2023, 7:01pm UTC](https://discourse.julialang.org/t/run-parrallel-computing-code/106645 "2023-11-23T19:01:38Z")

</div>

I have met this issue when I need to run the Performance Overview code GitError(Code:ENOTFOUND, Class:Config, config value ‘safe.directory’ was not found) Stacktrace: \[1\] macro expansion @ \[C:\\Users\\profe\\AppData\\Local\\…

---

## [Make EWMA as fast as pandas](https://discourse.julialang.org/t/make-ewma-as-fast-as-pandas/106416)

<div class="topic-metadata">

**Author:** [@AUK1939](https://discourse.julialang.org/u/AUK1939)\
**Replies:** 29\
**Last updated:** [November 23, 2023, 5:29pm UTC](https://discourse.julialang.org/t/make-ewma-as-fast-as-pandas/106416 "2023-11-23T17:29:15Z")

</div>

Hi I don’t think Julia has a EWMA implementation I could easily use (there are some old packages but they’re not maintained), so I tried to build my own based on the pandas implementation. This is what I’ve come up with …

---

## [Julia using openpyxl to change column width & row height](https://discourse.julialang.org/t/julia-using-openpyxl-to-change-column-width-row-height/45172)

<div class="topic-metadata">

**Author:** [@Emmanouil\_Bakirtzis](https://discourse.julialang.org/u/Emmanouil_Bakirtzis)\
**Replies:** 8\
**Last updated:** [November 23, 2023, 3:57pm UTC](https://discourse.julialang.org/t/julia-using-openpyxl-to-change-column-width-row-height/45172 "2023-11-23T15:57:21Z")

</div>

Hi all, I am using Julia 1.5.0 with openpyxl and I want to change the column width in an excel worksheet. The python way to this is depicted here: https://stackoverflow.com/questions/53906532/is-it-possible-to-change-…

---

## [Custom Sampler with multiple parameters](https://discourse.julialang.org/t/custom-sampler-with-multiple-parameters/106446)

<div class="topic-metadata">

**Author:** [@oliviermilla](https://discourse.julialang.org/u/oliviermilla)\
**Replies:** 4\
**Last updated:** [November 23, 2023, 1:37pm UTC](https://discourse.julialang.org/t/custom-sampler-with-multiple-parameters/106446 "2023-11-23T13:37:15Z")

</div>

Hello, with the following structures I’d like to do this: struct A a::Float64 b::Float64 end struct B x::Float64 end b = B(32.5) res = rand(A, b, 3) # Vector of 3 A with the computation of the random 3 A fact…

---

## [Dictionary with custom hash function](https://discourse.julialang.org/t/dictionary-with-custom-hash-function/49168)

<div class="topic-metadata">

**Author:** [@tisztamo](https://discourse.julialang.org/u/tisztamo)\
**Replies:** 6\
**Last updated:** [December 30, 2021, 7:45am UTC](https://discourse.julialang.org/t/dictionary-with-custom-hash-function/49168 "2021-12-30T07:45:22Z")

</div>

In a tight loop (50-100ns/cycle) I am using a dict filled with randomly generated UInt64 keys. I think that they could be used directly in a hashmap, without hashing, so I am looking for a hashmap with a custom (here th…

---

## [Mongoc errors in container with julia 1.9 libmongoc driver](https://discourse.julialang.org/t/mongoc-errors-in-container-with-julia-1-9-libmongoc-driver/106592)

<div class="topic-metadata">

**Author:** [@ginger\_snaps](https://discourse.julialang.org/u/ginger_snaps)\
**Replies:** 3\
**Last updated:** [November 23, 2023, 12:57pm UTC](https://discourse.julialang.org/t/mongoc-errors-in-container-with-julia-1-9-libmongoc-driver/106592 "2023-11-23T12:57:54Z")

</div>

bHello! Everything was fine on my PC (I use Julia 1.8) but I needed to deploy the app in a container and could not find the official 1.8 image so I installed 1.9. The problem appeared with Mongoc package. I have the sam…

---

## [Package Compiler doesn't download required artifact](https://discourse.julialang.org/t/package-compiler-doesnt-download-required-artifact/94967)

<div class="topic-metadata">

**Author:** [@haikal-arif](https://discourse.julialang.org/u/haikal-arif)\
**Replies:** 6\
**Last updated:** [November 23, 2023, 11:50am UTC](https://discourse.julialang.org/t/package-compiler-doesnt-download-required-artifact/94967 "2023-11-23T11:50:22Z")

</div>

I am trying to precompile LanguageServer using PackageCompiler by typing this into REPL using PackageCompiler; create\_sysimage(\[:LanguageServer,:SymbolServer\], sysimage\_path="./julials.dll", precompile\_statements\_file="…

---

## [Unstack dataframe with combine by the same date](https://discourse.julialang.org/t/unstack-dataframe-with-combine-by-the-same-date/106614)

<div class="topic-metadata">

**Author:** [@Tatiana\_P](https://discourse.julialang.org/u/Tatiana_P)\
**Replies:** 1\
**Last updated:** [November 23, 2023, 8:56am UTC](https://discourse.julialang.org/t/unstack-dataframe-with-combine-by-the-same-date/106614 "2023-11-23T08:56:17Z")

</div>

What is the simplest way to unstack the following dataframe df = DataFrame(date=\[Date(2018,1,1), Date(2018,1,1), Date(2018,1,1), Date(2018,1,2), Date(2018,1,2), Date(2018,1,2)\], B=\[“T1”, “T2”, “T3”, “T1”, “T2”, “T3”\], v…

---

## [How to generate a customized \`for\` loop code?](https://discourse.julialang.org/t/how-to-generate-a-customized-for-loop-code/106552)

<div class="topic-metadata">

**Author:** [@frankwswang](https://discourse.julialang.org/u/frankwswang)\
**Replies:** 6\
**Last updated:** [November 23, 2023, 8:01am UTC](https://discourse.julialang.org/t/how-to-generate-a-customized-for-loop-code/106552 "2023-11-23T08:01:17Z")

</div>

I’m using the macro @hyperopt from package hyperopt.jl to optimize some hyperparameters for a machine learning model. However, I’m pretty constrained by the syntax of @hyperopt, which is designed to be used as follows: h…

---

## [Speeding up a color transformation loop](https://discourse.julialang.org/t/speeding-up-a-color-transformation-loop/106445)

<div class="topic-metadata">

**Author:** [@mpeters2](https://discourse.julialang.org/u/mpeters2)\
**Replies:** 29\
**Last updated:** [November 23, 2023, 12:23am UTC](https://discourse.julialang.org/t/speeding-up-a-color-transformation-loop/106445 "2023-11-23T00:23:40Z")

</div>

First, a little background. I have an image \[2000 x 2000 pixels\] I am applying different illuminants to. Towards the end of this process I have to transform the CIE1931 X,Y, and Z coordinate to RGB. These are stored as…

---

## [Read mouse position in Pluto?](https://discourse.julialang.org/t/read-mouse-position-in-pluto/105919)

<div class="topic-metadata">

**Author:** [@bobmccrory](https://discourse.julialang.org/u/bobmccrory)\
**Replies:** 7\
**Last updated:** [November 22, 2023, 7:30pm UTC](https://discourse.julialang.org/t/read-mouse-position-in-pluto/105919 "2023-11-22T19:30:15Z")

</div>

I would like to construct a simple Mandelbrot browser in Pluto. In particular, I’d like to be able to put my mouse pointer on a point on a plot, read the position (preferably a complex number) and press a mouse button to…

---

## [How to properly install the HSL.jl package?](https://discourse.julialang.org/t/how-to-properly-install-the-hsl-jl-package/106541)

<div class="topic-metadata">

**Author:** [@Hugo](https://discourse.julialang.org/u/Hugo)\
**Replies:** 3\
**Last updated:** [November 22, 2023, 7:27pm UTC](https://discourse.julialang.org/t/how-to-properly-install-the-hsl-jl-package/106541 "2023-11-22T19:27:37Z")

</div>

A few of the packages I use often have the package HSL.jl as a dependency. I have noticed that when I install packages that have such dependency, I get a message informing me that HSL.jl is not properly installed and I n…

---

## [Optimize Julia for size, and other potential or actual switches](https://discourse.julialang.org/t/optimize-julia-for-size-and-other-potential-or-actual-switches/106584)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 0\
**Last updated:** [November 22, 2023, 4:33pm UTC](https://discourse.julialang.org/t/optimize-julia-for-size-and-other-potential-or-actual-switches/106584 "2023-11-22T16:33:36Z")

</div>

Julia has -O, --optimize={0,1,2\*,3} Set the optimization level (level 3 if -O is used without a level) ($) I.e. -O2 is the default (unlike in e.g. C/C++), does anyone use -O3 aka -O, or the other options often? It …

---

## [Error precompiling Differential Equations: in setfield!, expected LinearAlgebra.QRPivoted](https://discourse.julialang.org/t/error-precompiling-differential-equations-in-setfield-expected-linearalgebra-qrpivoted/106581)

<div class="topic-metadata">

**Author:** [@vxj9800](https://discourse.julialang.org/u/vxj9800)\
**Replies:** 3\
**Last updated:** [November 22, 2023, 3:50pm UTC](https://discourse.julialang.org/t/error-precompiling-differential-equations-in-setfield-expected-linearalgebra-qrpivoted/106581 "2023-11-22T15:50:38Z")

</div>

I am facing the issue of precompiling DifferentialEquations with a fresh install of Julia 1.9.4 in Windows 11. I am not sure if the core in my case issue is the same as the one being discussed above. Following is the out…

---

## [Error precompiling DifferentialEquations: NonlinearLeastSquaresProblem not defined](https://discourse.julialang.org/t/error-precompiling-differentialequations-nonlinearleastsquaresproblem-not-defined/105855)

<div class="topic-metadata">

**Author:** [@bernardofpc](https://discourse.julialang.org/u/bernardofpc)\
**Replies:** 2\
**Last updated:** [November 7, 2023, 10:34am UTC](https://discourse.julialang.org/t/error-precompiling-differentialequations-nonlinearleastsquaresproblem-not-defined/105855 "2023-11-07T10:34:26Z")

</div>

I am using Julia 1.8.5 in VSCode on Windows. I just started a new environment using import Pkg Pkg.activate("math", shared=true) Then I tried to install DifferentialEquations, but got the following error: Precompilin…

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

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