# General Usage

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

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

**Page:** 198

---

## [Julia documentation not available from Firefox](https://discourse.julialang.org/t/julia-documentation-not-available-from-firefox/110502)

<div class="topic-metadata">

**Author:** [@tvali](https://discourse.julialang.org/u/tvali)\
**Replies:** 9\
**Last updated:** [February 21, 2024, 2:00pm UTC](https://discourse.julialang.org/t/julia-documentation-not-available-from-firefox/110502 "2024-02-21T14:00:33Z")

</div>

Hello! I cannot access installed Julia html documentation from firefox - it says Acess Denied. The documentation is located at file:///snap/julia/92/share/doc/julia/html/en/index.html and is the one, which comes with th…

---

## [Storing comparisons](https://discourse.julialang.org/t/storing-comparisons/110513)

<div class="topic-metadata">

**Author:** [@Enlil50](https://discourse.julialang.org/u/Enlil50)\
**Replies:** 1\
**Last updated:** [February 21, 2024, 1:58pm UTC](https://discourse.julialang.org/t/storing-comparisons/110513 "2024-02-21T13:58:54Z")

</div>

I have a program which computes a number, stores it and uses it for many times. Then it proceeds to the next iteration (it’s a loop), generates another number, stores it and uses it as well for many times. Considering …

---

## [Non-GPL sparse arrays and/or 3D+ sparse](https://discourse.julialang.org/t/non-gpl-sparse-arrays-and-or-3d-sparse/110510)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 0\
**Last updated:** [February 21, 2024, 12:21pm UTC](https://discourse.julialang.org/t/non-gpl-sparse-arrays-and-or-3d-sparse/110510 "2024-02-21T12:21:00Z")

</div>

Currently Julia is GPLed, seemingly, even in 1.11-DEV: julia\> Base.USE\_GPL\_LIBS true I thought the SuiteSparse GPL dependency had been dropped (making Julia non-copyleft in 1.10) and SparseArrays.jl independent of it. …

---

## [Ifelse vs ternary with tuples](https://discourse.julialang.org/t/ifelse-vs-ternary-with-tuples/110423)

<div class="topic-metadata">

**Author:** [@moble](https://discourse.julialang.org/u/moble)\
**Replies:** 6\
**Last updated:** [February 21, 2024, 9:03am UTC](https://discourse.julialang.org/t/ifelse-vs-ternary-with-tuples/110423 "2024-02-21T09:03:02Z")

</div>

I believe I have the basic idea of when to use ifelse instead of the ternary operator. Basically, ifelse avoids an expensive branch, but computes the two possibilities — which may be more expensive. (Also ifelse may be…

---

## [How come a struct is type unstable, if too many different field types?](https://discourse.julialang.org/t/how-come-a-struct-is-type-unstable-if-too-many-different-field-types/110447)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 2\
**Last updated:** [February 21, 2024, 12:38am UTC](https://discourse.julialang.org/t/how-come-a-struct-is-type-unstable-if-too-many-different-field-types/110447 "2024-02-21T00:38:27Z")

</div>

Hello! The real code is a bit of a mess, so just giving an example and looking for a hint. I have defined a struct as: @with\_kw struct CLL{I,T,D} Points::Vector{SVector{D,T}} MaxValidIndex::Base.RefValue{Int} =…

---

## [KrylovKit, syntax issue](https://discourse.julialang.org/t/krylovkit-syntax-issue/110359)

<div class="topic-metadata">

**Author:** [@Enlil50](https://discourse.julialang.org/u/Enlil50)\
**Replies:** 28\
**Last updated:** [February 21, 2024, 8:25am UTC](https://discourse.julialang.org/t/krylovkit-syntax-issue/110359 "2024-02-21T08:25:37Z")

</div>

So, I’m trying to use Lanczos diagnalization of a sparse marix of float64. Now I don’t want to specify the hint x0, so i just use rand(): Energy\[i\], psi\_ground, info = eigsolve(H\_super, rand(Float64, m\*2), 1, :SR, Lancz…

---

## [List of matrices](https://discourse.julialang.org/t/list-of-matrices/110456)

<div class="topic-metadata">

**Author:** [@Enlil50](https://discourse.julialang.org/u/Enlil50)\
**Replies:** 6\
**Last updated:** [February 21, 2024, 7:33am UTC](https://discourse.julialang.org/t/list-of-matrices/110456 "2024-02-21T07:33:14Z")

</div>

Is there something better than this, to hold matrices? (not that i complain, just curious) C = Vector{AbstractMatrix{Float64}}(undef, 2) for i = 1:2 A = rand(Float64, i\*2, i\*2) display(A) C\[i\] = A end displa…

---

## [Avoiding recompilation between interactive use and testing by making testing also checkbounds=auto?](https://discourse.julialang.org/t/avoiding-recompilation-between-interactive-use-and-testing-by-making-testing-also-checkbounds-auto/100830)

<div class="topic-metadata">

**Author:** [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Replies:** 8\
**Last updated:** [February 21, 2024, 2:52am UTC](https://discourse.julialang.org/t/avoiding-recompilation-between-interactive-use-and-testing-by-making-testing-also-checkbounds-auto/100830 "2024-02-21T02:52:04Z")

</div>

So because by default julia runs with check-bounds=auto, but when testing it runs with check-bounds=yes and those generate different package-images, julia will have to re-precompile everything when you change from int…

---

## [Warning about name conflict](https://discourse.julialang.org/t/warning-about-name-conflict/109743)

<div class="topic-metadata">

**Author:** [@bwanab](https://discourse.julialang.org/u/bwanab)\
**Replies:** 6\
**Last updated:** [February 21, 2024, 12:11am UTC](https://discourse.julialang.org/t/warning-about-name-conflict/109743 "2024-02-21T00:11:43Z")

</div>

I see some existing answers to this question, but I still don’t understand in this case: I’ve got a function in a module step(a::MyType1, b::MyType2) Where I invoke this in my code, I get a warning that it is in confl…

---

## [How to filter Date data column in a DataFrame](https://discourse.julialang.org/t/how-to-filter-date-data-column-in-a-dataframe/110485)

<div class="topic-metadata">

**Author:** [@PeX](https://discourse.julialang.org/u/PeX)\
**Replies:** 3\
**Last updated:** [February 20, 2024, 11:58pm UTC](https://discourse.julialang.org/t/how-to-filter-date-data-column-in-a-dataframe/110485 "2024-02-20T23:58:30Z")

</div>

Hi everyone, I have a DataFrame with Dates type in one column named “Date” (the rest of the columns are with regular data). I want to filter the dataframe to have data only between years 2015 and 2019. I tried: df\[@. …

---

## [Why is Capital D 'Display' variable within Plots package stopping me from pre-compiling?](https://discourse.julialang.org/t/why-is-capital-d-display-variable-within-plots-package-stopping-me-from-pre-compiling/110487)

<div class="topic-metadata">

**Author:** [@ssmclark](https://discourse.julialang.org/u/ssmclark)\
**Replies:** 1\
**Last updated:** [February 20, 2024, 11:32pm UTC](https://discourse.julialang.org/t/why-is-capital-d-display-variable-within-plots-package-stopping-me-from-pre-compiling/110487 "2024-02-20T23:32:45Z")

</div>

struct PlotsDisplay \<: Display end This is line 9 in types.jl within the Plots package. I’ve tried removing the package, using the garbage cleaner ‘gc’, rebuilding it, using different versions. Every time I try to compi…

---

## [Metaprogramming: macro calling another macro making named variables](https://discourse.julialang.org/t/metaprogramming-macro-calling-another-macro-making-named-variables/109621)

<div class="topic-metadata">

**Author:** [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Replies:** 7\
**Last updated:** [February 20, 2024, 11:17pm UTC](https://discourse.julialang.org/t/metaprogramming-macro-calling-another-macro-making-named-variables/109621 "2024-02-20T23:17:24Z")

</div>

Ooof, I need some metaprogramming help… There is the macro @parameters x = 0.5. The macro, in a simplified sense, does the following: makes a named parameter with name :x and default value 0.5 and returns the container a…

---

## [GUI options for Julia?](https://discourse.julialang.org/t/gui-options-for-julia/110474)

<div class="topic-metadata">

**Author:** [@math\_opt](https://discourse.julialang.org/u/math_opt)\
**Replies:** 6\
**Last updated:** [February 20, 2024, 10:52pm UTC](https://discourse.julialang.org/t/gui-options-for-julia/110474 "2024-02-20T22:52:56Z")

</div>

I have a Julia project that I currently execute in REPL. It takes input from the user dynamically and saves stuff (figures, files). Although REPL is good for testing phase, I eventually plan to have a better interface fo…

---

## [Revise warnings on v1.10.1](https://discourse.julialang.org/t/revise-warnings-on-v1-10-1/110237)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 14\
**Last updated:** [February 20, 2024, 9:30pm UTC](https://discourse.julialang.org/t/revise-warnings-on-v1-10-1/110237 "2024-02-20T21:30:03Z")

</div>

I’m trying to use DSP and Plots together on v1.10.1, but I’m encountering many warnings from Revise when trying to install these. Are these serious, and how do I resolve these? (@v1.10) pkg\> activate --temp Activating…

---

## [Changing axis properties after plotting](https://discourse.julialang.org/t/changing-axis-properties-after-plotting/110461)

<div class="topic-metadata">

**Author:** [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Replies:** 3\
**Last updated:** [February 20, 2024, 9:19pm UTC](https://discourse.julialang.org/t/changing-axis-properties-after-plotting/110461 "2024-02-20T21:19:02Z")

</div>

I’m wondering if there is a way to change the axis properties after plotting. For example, using CairoMakie fig = Figure() fig\[1,1\] = Axis(fig) xs = range(0, 2π, 100) lines!(xs, sin.(xs)) # Want something like the fol…

---

## [Mul! vs \* benchmarks](https://discourse.julialang.org/t/mul-vs-benchmarks/110448)

<div class="topic-metadata">

**Author:** [@Enlil50](https://discourse.julialang.org/u/Enlil50)\
**Replies:** 2\
**Last updated:** [February 20, 2024, 4:41pm UTC](https://discourse.julialang.org/t/mul-vs-benchmarks/110448 "2024-02-20T16:41:23Z")

</div>

I have these 4 examles I’m benchmarking: using SparseArrays using LinearAlgebra using BenchmarkTools using Random function myfun1(m::Integer, n::Integer) Random.seed!(1) A = rand(Float64, n, n) B = sparse(r…

---

## [Julia Symbolics in Jupyter - Initializing LaTeX printing](https://discourse.julialang.org/t/julia-symbolics-in-jupyter-initializing-latex-printing/110377)

<div class="topic-metadata">

**Author:** [@brombo](https://discourse.julialang.org/u/brombo)\
**Replies:** 7\
**Last updated:** [February 20, 2024, 8:27pm UTC](https://discourse.julialang.org/t/julia-symbolics-in-jupyter-initializing-latex-printing/110377 "2024-02-20T20:27:30Z")

</div>

I am familiar with using python and sympy on Jupyter Notebook. When printing LaTeX expressions on Notebook I have in my printing modules the statement - init\_printing( use\_latex='mathjax', …

---

## [How to use autodiff with Quadrature.jl](https://discourse.julialang.org/t/how-to-use-autodiff-with-quadrature-jl/77437)

<div class="topic-metadata">

**Author:** [@samerb](https://discourse.julialang.org/u/samerb)\
**Replies:** 4\
**Last updated:** [February 20, 2024, 7:47pm UTC](https://discourse.julialang.org/t/how-to-use-autodiff-with-quadrature-jl/77437 "2024-02-20T19:47:39Z")

</div>

I’m trying to use autodiff on a function that uses Quadrature.jl numerical integration. I’m getting an error and not sure why. Any suggestions? Thanks. The function f(y) is \\int\_0^y x dx - y (computed numerically using …

---

## [Hard error using dice loss](https://discourse.julialang.org/t/hard-error-using-dice-loss/110059)

<div class="topic-metadata">

**Author:** [@cirobr](https://discourse.julialang.org/u/cirobr)\
**Replies:** 2\
**Last updated:** [February 20, 2024, 7:44pm UTC](https://discourse.julialang.org/t/hard-error-using-dice-loss/110059 "2024-02-20T19:44:05Z")

</div>

Cheers, Regardless of the model, data, or any other condition, I’ve never been able of using the built-in Flux.dice\_coeff\_loss() function. A very long error dump shows up, apparently tied to CUDA and memory usage For t…

---

## [The speed of inter-process communication via RemoteChannels](https://discourse.julialang.org/t/the-speed-of-inter-process-communication-via-remotechannels/110424)

<div class="topic-metadata">

**Author:** [@sumiya11](https://discourse.julialang.org/u/sumiya11)\
**Replies:** 4\
**Last updated:** [February 20, 2024, 7:18pm UTC](https://discourse.julialang.org/t/the-speed-of-inter-process-communication-via-remotechannels/110424 "2024-02-20T19:18:30Z")

</div>

I wish to roughly measure the latency and throughput of process communication in Julia, to decide how to use multi-processing in my implementation. In the following script, I compare main and main\_with\_channels: using …

---

## [Problems with file paths](https://discourse.julialang.org/t/problems-with-file-paths/110460)

<div class="topic-metadata">

**Author:** [@snipick19](https://discourse.julialang.org/u/snipick19)\
**Replies:** 3\
**Last updated:** [February 20, 2024, 4:33pm UTC](https://discourse.julialang.org/t/problems-with-file-paths/110460 "2024-02-20T16:33:08Z")

</div>

Hello ! I am using a Python script that calls a shell script, which in turn executes a Julia script. Here is the python script : import os import subprocess BUFFERSIZE = 72000 def julia\_spike\_filter(projectPath, fold…

---

## [Several questions that arise during learning package development](https://discourse.julialang.org/t/several-questions-that-arise-during-learning-package-development/110399)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 7\
**Last updated:** [February 20, 2024, 2:37pm UTC](https://discourse.julialang.org/t/several-questions-that-arise-during-learning-package-development/110399 "2024-02-20T14:37:24Z")

</div>

I’m trying to understand the organization mechanism of Julia packages and seeking for a good workflow that is suitable for me for package development. My expected learning roadmap is to firstly create a minimal package f…

---

## [Accessing non-exported package extension functions](https://discourse.julialang.org/t/accessing-non-exported-package-extension-functions/109058)

<div class="topic-metadata">

**Author:** [@Brad\_Carman](https://discourse.julialang.org/u/Brad_Carman)\
**Replies:** 16\
**Last updated:** [February 20, 2024, 11:49am UTC](https://discourse.julialang.org/t/accessing-non-exported-package-extension-functions/109058 "2024-02-20T11:49:27Z")

</div>

If module A has an extension B with a function b\_fun(), how can I call this function? I was assuming I could do: using A using A.B: b\_fun b\_fun() The namespacing for package extensions has me a little confused.

---

## [Krylovkit tolerance changes results drastically](https://discourse.julialang.org/t/krylovkit-tolerance-changes-results-drastically/110450)

<div class="topic-metadata">

**Author:** [@Enlil50](https://discourse.julialang.org/u/Enlil50)\
**Replies:** 0\
**Last updated:** [February 20, 2024, 11:16am UTC](https://discourse.julialang.org/t/krylovkit-tolerance-changes-results-drastically/110450 "2024-02-20T11:16:17Z")

</div>

I’m writing a difficult to read code, just because I know the analytical result which is -0.274519. This value is meant to be compared with what is printed in the 4th column of this (a laptop is more than enough). When…

---

## [GLMakie - Polar heatmap/ millions of Polygons(?)](https://discourse.julialang.org/t/glmakie-polar-heatmap-millions-of-polygons/98470)

<div class="topic-metadata">

**Author:** [@Ertyk](https://discourse.julialang.org/u/Ertyk)\
**Replies:** 1\
**Last updated:** [February 20, 2024, 10:37am UTC](https://discourse.julialang.org/t/glmakie-polar-heatmap-millions-of-polygons/98470 "2024-02-20T10:37:20Z")

</div>

Hello, I am trying to plot (a lot of) data in a live “polar heatmap”. A triangular visualization like below is ok. For now I have used polygons by modifying this example: https://docs.makie.org/stable/examples/plott…

---

## [Missing values in character or string](https://discourse.julialang.org/t/missing-values-in-character-or-string/107691)

<div class="topic-metadata">

**Author:** [@Leon6](https://discourse.julialang.org/u/Leon6)\
**Replies:** 18\
**Last updated:** [February 20, 2024, 9:25am UTC](https://discourse.julialang.org/t/missing-values-in-character-or-string/107691 "2024-02-20T09:25:40Z")

</div>

I’m trying to read values out of a NetCDF file. Unfortunately, the missing values seem to be mistakenly stored as characters or strings by the data creator. Here is my code to read data out of the nc file: ds1 = NCData…

---

## [Index a matrix with two separate row and column index vectors](https://discourse.julialang.org/t/index-a-matrix-with-two-separate-row-and-column-index-vectors/110410)

<div class="topic-metadata">

**Author:** [@Shuhua](https://discourse.julialang.org/u/Shuhua)\
**Replies:** 4\
**Last updated:** [February 20, 2024, 8:26am UTC](https://discourse.julialang.org/t/index-a-matrix-with-two-separate-row-and-column-index-vectors/110410 "2024-02-20T08:26:17Z")

</div>

I have a matrix A and a row index vector R and a column index vector C. I want to get a vector from A as \[A\[R\[1\], C\[1\]\], A\[R\[2\], C\[2\]\], ...\]. For instance, with R=\[2, 4\], C=\[3, 1\], I want \[A\[2, 3\], A\[4, 1\]\]. Is there …

---

## [Why does indexing into CartesianIndices lead to excessive runtime dispatch?](https://discourse.julialang.org/t/why-does-indexing-into-cartesianindices-lead-to-excessive-runtime-dispatch/110438)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 9\
**Last updated:** [February 20, 2024, 8:17am UTC](https://discourse.julialang.org/t/why-does-indexing-into-cartesianindices-lead-to-excessive-runtime-dispatch/110438 "2024-02-20T08:17:31Z")

</div>

This just looks so weird to me. The code is really simply: function neighbors(d::Int) n\_ = CartesianIndices((fill(-1:1, d)...,)) n = n\_\[begin:end//2\] #This line runtime errors end using JET @report\_opt neigh…

---

## [Constructing Q matrix from QR decomposition](https://discourse.julialang.org/t/constructing-q-matrix-from-qr-decomposition/110383)

<div class="topic-metadata">

**Author:** [@Endeavour](https://discourse.julialang.org/u/Endeavour)\
**Replies:** 3\
**Last updated:** [February 19, 2024, 10:20am UTC](https://discourse.julialang.org/t/constructing-q-matrix-from-qr-decomposition/110383 "2024-02-19T10:20:23Z")

</div>

Hi! I am working with some large complex float matrices ( that may go up to 16000x16000). I need to do a QR decomposition of a rectangular matrix. I require the Q matrix to be square. It seems like that extracting the Q…

---

## [MKL package wrong results](https://discourse.julialang.org/t/mkl-package-wrong-results/110405)

<div class="topic-metadata">

**Author:** [@Enlil50](https://discourse.julialang.org/u/Enlil50)\
**Replies:** 6\
**Last updated:** [February 19, 2024, 10:26pm UTC](https://discourse.julialang.org/t/mkl-package-wrong-results/110405 "2024-02-19T22:26:22Z")

</div>

I have this program. I post it as it is. If I write: using MKL using MKLSparse It gives me (that’s an iteration of results with a matrix parameter on the first column): 02 | -0.37499999999999944 | 0.0 | -0.1874999999…

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

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