# General Usage

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

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

**Page:** 531

---

## [SymRCM doesn't seem to help linear solver to perform](https://discourse.julialang.org/t/symrcm-doesnt-seem-to-help-linear-solver-to-perform/69878)

<div class="topic-metadata">

**Author:** [@Niceno](https://discourse.julialang.org/u/Niceno)\
**Replies:** 12\
**Last updated:** [October 22, 2021, 9:37am UTC](https://discourse.julialang.org/t/symrcm-doesnt-seem-to-help-linear-solver-to-perform/69878 "2021-10-22T09:37:21Z")

</div>

Dear all, Yesterday I came across SymRCM.jl package, which seems to work really neatly and is easy to use, but it doesn’t seem to bring me any performance benefits. Allow me to explain. I wrote a little computational …

---

## [Tweaking @btime](https://discourse.julialang.org/t/tweaking-btime/70090)

<div class="topic-metadata">

**Author:** [@Giulio\_Benedetti](https://discourse.julialang.org/u/Giulio_Benedetti)\
**Replies:** 8\
**Last updated:** [October 22, 2021, 9:34am UTC](https://discourse.julialang.org/t/tweaking-btime/70090 "2021-10-22T09:34:08Z")

</div>

Hello! The docs of the macro ‘@btime’ says: The printed time is the minimum elapsed time measured during the benchmark. Is there a way to make the macro ‘@btime’ print the mean execution time instead of the minimum? …

---

## [Extracting Default Arguments from Function Signature](https://discourse.julialang.org/t/extracting-default-arguments-from-function-signature/70112)

<div class="topic-metadata">

**Author:** [@anicusan](https://discourse.julialang.org/u/anicusan)\
**Replies:** 1\
**Last updated:** [October 22, 2021, 9:14am UTC](https://discourse.julialang.org/t/extracting-default-arguments-from-function-signature/70112 "2021-10-22T09:14:41Z")

</div>

Is there any way to extract the default values from a method’s signature? For example, say I define: # Function with two keyword arguments that have default values function f(x, y; kx = 3, ky = 4) end # Call function w…

---

## [Type inference with a functional programing style](https://discourse.julialang.org/t/type-inference-with-a-functional-programing-style/70105)

<div class="topic-metadata">

**Author:** [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Replies:** 10\
**Last updated:** [October 22, 2021, 8:43am UTC](https://discourse.julialang.org/t/type-inference-with-a-functional-programing-style/70105 "2021-10-22T08:43:21Z")

</div>

I’m having trouble with type inference. I’d like to be able to write this sort of thing and have it run quickly: function silly\_last(vs::AbstractVector) x = first(vs) map(vs) do v x = v end x e…

---

## [How to use LBFGS to get the minimum value in the optimization process, but not the last one](https://discourse.julialang.org/t/how-to-use-lbfgs-to-get-the-minimum-value-in-the-optimization-process-but-not-the-last-one/70080)

<div class="topic-metadata">

**Author:** [@F-YF](https://discourse.julialang.org/u/F-YF)\
**Replies:** 5\
**Last updated:** [October 22, 2021, 6:54am UTC](https://discourse.julialang.org/t/how-to-use-lbfgs-to-get-the-minimum-value-in-the-optimization-process-but-not-the-last-one/70080 "2021-10-22T06:54:45Z")

</div>

When I was doing optimization calculations with the Optim package\[Optim.jl\], , I found that the objective function sometimes unexpectedly tended to go up. I think it might have something to do with the LBFGS method, the …

---

## [Error when using DifferentialEquations](https://discourse.julialang.org/t/error-when-using-differentialequations/70079)

<div class="topic-metadata">

**Author:** [@gnicolosi](https://discourse.julialang.org/u/gnicolosi)\
**Replies:** 2\
**Last updated:** [October 20, 2021, 10:49am UTC](https://discourse.julialang.org/t/error-when-using-differentialequations/70079 "2021-10-20T10:49:57Z")

</div>

I have read some old similar questions, but could not find a suitable solution. When I enter using DifferentialEquations this is what I get. Someone can tell me what it is going on, please? Thank you! Failed to precompi…

---

## [Float vs integer and the == sign](https://discourse.julialang.org/t/float-vs-integer-and-the-sign/70172)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 7\
**Last updated:** [October 22, 2021, 3:13am UTC](https://discourse.julialang.org/t/float-vs-integer-and-the-sign/70172 "2021-10-22T03:13:17Z")

</div>

I noticed that when D has at least one floating numbers, this program will work: D = \[-0, 0, 1, 5, 0, 7.1, 0\] D\[D .== 0\] .= 0.0001; But it will quit working when D is composed of integers entirely. D = \[-0, 0, 1, 5, …

---

## [Is typeof(x::Unitful).parameters\[1\] reliable?](https://discourse.julialang.org/t/is-typeof-x-unitful-parameters-1-reliable/70185)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 1\
**Last updated:** [October 22, 2021, 1:04am UTC](https://discourse.julialang.org/t/is-typeof-x-unitful-parameters-1-reliable/70185 "2021-10-22T01:04:44Z")

</div>

Is this a reliable (stable) way to extract the type of float of a value of type Unitful, or is this an implementation detail? Is there a standard way to do so? julia\> using Unitful julia\> x = 1.0u"nm" 1.0 nm julia\> ty…

---

## [Making a Boolean Operator Not a Boolean Operator (And Operator Precedence)](https://discourse.julialang.org/t/making-a-boolean-operator-not-a-boolean-operator-and-operator-precedence/70138)

<div class="topic-metadata">

**Author:** [@uniment](https://discourse.julialang.org/u/uniment)\
**Replies:** 2\
**Last updated:** [October 22, 2021, 12:33am UTC](https://discourse.julialang.org/t/making-a-boolean-operator-not-a-boolean-operator-and-operator-precedence/70138 "2021-10-22T00:33:48Z")

</div>

I’ve defined the binary “parallel” operator as: ∥(a::Number,b::Number) = 1/(1/a+1/b) This operation is very common in electronics, and is related to the harmonic mean. I’ve also overloaded it with ∥(a::Component,b::Co…

---

## [How to read tables out of a MAT file?](https://discourse.julialang.org/t/how-to-read-tables-out-of-a-mat-file/70098)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 11\
**Last updated:** [October 21, 2021, 8:55pm UTC](https://discourse.julialang.org/t/how-to-read-tables-out-of-a-mat-file/70098 "2021-10-21T20:55:00Z")

</div>

Normally, this is how I read a variable out of a MAT file: using MAT F1 = matopen("test.mat"); Var1 = read(F1, "Var1"); close(F1); Now I have some Matlab tables stored in the MAT file. Below is an example: Name …

---

## [Is this a bug of the Julia function "unique"?](https://discourse.julialang.org/t/is-this-a-bug-of-the-julia-function-unique/70141)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 31\
**Last updated:** [October 21, 2021, 8:49pm UTC](https://discourse.julialang.org/t/is-this-a-bug-of-the-julia-function-unique/70141 "2021-10-21T20:49:14Z")

</div>

I notice that any NaN values inside a data will mess up Julia’s unique function. For example I have a matrix A with 3 duplicate rows: A = \[1 NaN 3; 1 NaN 3; 1 NaN 3\]; 3×3 Matrix{Float64}: 1.0 NaN 3.0 1.0 NaN 3.0 …

---

## [How to write a specific column name in CSV.write function?](https://discourse.julialang.org/t/how-to-write-a-specific-column-name-in-csv-write-function/70176)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 9\
**Last updated:** [October 21, 2021, 8:30pm UTC](https://discourse.julialang.org/t/how-to-write-a-specific-column-name-in-csv-write-function/70176 "2021-10-21T20:30:34Z")

</div>

I have an empty csv file named “Output”. I want to to show the values of V under a specific column name (in my case V\_S1 as will be shown by the println()). However, I am having the below error. Any idea to handle this i…

---

## [Is there a way to detect and automatically fix type-unstable code?](https://discourse.julialang.org/t/is-there-a-way-to-detect-and-automatically-fix-type-unstable-code/70115)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 4\
**Last updated:** [October 21, 2021, 4:44pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-detect-and-automatically-fix-type-unstable-code/70115 "2021-10-21T16:44:24Z")

</div>

E.g. lets say you do: julia\> if x % 2 == 0 x/2 else 2x end I believe there is a macro to check, I forget which, but could a macro “conform” the type of both code paths, i.e. here to Floa…

---

## [Questions related to -0.0 and 0.0](https://discourse.julialang.org/t/questions-related-to-0-0-and-0-0/70158)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 9\
**Last updated:** [October 21, 2021, 3:53pm UTC](https://discourse.julialang.org/t/questions-related-to-0-0-and-0-0/70158 "2021-10-21T15:53:48Z")

</div>

I’m using PCHIPInterpolation to do some interpolation. itp = Interpolator(xs, ys); This program absolutely does not allow any values in its x to be duplicates. I now have some values like the below in my data sets: xs…

---

## [Creating a video "file" and sending it to a web server without saving it to disk](https://discourse.julialang.org/t/creating-a-video-file-and-sending-it-to-a-web-server-without-saving-it-to-disk/70074)

<div class="topic-metadata">

**Author:** [@adriano.vilela](https://discourse.julialang.org/u/adriano.vilela)\
**Replies:** 2\
**Last updated:** [October 21, 2021, 3:08pm UTC](https://discourse.julialang.org/t/creating-a-video-file-and-sending-it-to-a-web-server-without-saving-it-to-disk/70074 "2021-10-21T15:08:17Z")

</div>

Hi, I’m working on a problem where I need to encode a video and send it to a web server. I’m using VideoIO.jl to encode the video, as shown here: https://juliaio.github.io/VideoIO.jl/stable/writing/ The link above sh…

---

## [How to distribute standalone Julia applications to non-programmers?](https://discourse.julialang.org/t/how-to-distribute-standalone-julia-applications-to-non-programmers/70151)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 3\
**Last updated:** [October 21, 2021, 2:39pm UTC](https://discourse.julialang.org/t/how-to-distribute-standalone-julia-applications-to-non-programmers/70151 "2021-10-21T14:39:08Z")

</div>

I’d like to distribute standalone applications written in Julia to users who don’t program in Julia, and I want the installation process to be as easy as possible. The user may be using a remote cluster with an outdated …

---

## [Type stable return types](https://discourse.julialang.org/t/type-stable-return-types/70140)

<div class="topic-metadata">

**Author:** [@Amval](https://discourse.julialang.org/u/Amval)\
**Replies:** 3\
**Last updated:** [October 21, 2021, 1:40pm UTC](https://discourse.julialang.org/t/type-stable-return-types/70140 "2021-10-21T13:40:14Z")

</div>

Hello, I have a question regarding type-stability and good practices. Let’s say I have a function/constructor that takes a params::Dict which has some optional fields and returns a Session struct instance with the follo…

---

## [\`show\` versus \`parse\` and arrays with 2 dimensions but only one column](https://discourse.julialang.org/t/show-versus-parse-and-arrays-with-2-dimensions-but-only-one-column/70142)

<div class="topic-metadata">

**Author:** [@PGS62](https://discourse.julialang.org/u/PGS62)\
**Replies:** 4\
**Last updated:** [October 21, 2021, 12:16pm UTC](https://discourse.julialang.org/t/show-versus-parse-and-arrays-with-2-dimensions-but-only-one-column/70142 "2021-10-21T12:16:31Z")

</div>

The documentation for show states: “Write a text representation of a value x … and should be parseable Julia code when possible”. So I took that to mean that show and Main.eval(Meta.parse()) should (if poss) be inverses …

---

## [I think there is a memory leak either in julia or in HTTP.jl](https://discourse.julialang.org/t/i-think-there-is-a-memory-leak-either-in-julia-or-in-http-jl/68990)

<div class="topic-metadata">

**Author:** [@Steven\_Sagaert](https://discourse.julialang.org/u/Steven_Sagaert)\
**Replies:** 8\
**Last updated:** [October 11, 2021, 3:00pm UTC](https://discourse.julialang.org/t/i-think-there-is-a-memory-leak-either-in-julia-or-in-http-jl/68990 "2021-10-11T15:00:13Z")

</div>

I have a web application that loads a trained model and then basically queries this model and shows result in handwritten html only using HTTP.jl no other web frameworks. Training the model goes fine as far a memory is …

---

## [Turing Model: Multiple return variables](https://discourse.julialang.org/t/turing-model-multiple-return-variables/70039)

<div class="topic-metadata">

**Author:** [@Temi-Tory](https://discourse.julialang.org/u/Temi-Tory)\
**Replies:** 3\
**Last updated:** [October 21, 2021, 9:00am UTC](https://discourse.julialang.org/t/turing-model-multiple-return-variables/70039 "2021-10-21T09:00:17Z")

</div>

Hi, I’m new to Turing and Julia and I honestly can’t figure out what I am doing wrong here. I have a model that I want to return: an array and of Boolean values of N values eg: \[true, false, true, false\] An integer va…

---

## [Package ExprRules - defining a grammar by referencing a vector](https://discourse.julialang.org/t/package-exprrules-defining-a-grammar-by-referencing-a-vector/70132)

<div class="topic-metadata">

**Author:** [@anneJulia](https://discourse.julialang.org/u/anneJulia)\
**Replies:** 2\
**Last updated:** [October 21, 2021, 8:26am UTC](https://discourse.julialang.org/t/package-exprrules-defining-a-grammar-by-referencing-a-vector/70132 "2021-10-21T08:26:37Z")

</div>

I am trying to define a boolean expression grammar which has changing rules. I would like to reference a vector of strings, to then change certain production rules of the grammar. The following minimal working example i…

---

## [Attaching simple metadata to types](https://discourse.julialang.org/t/attaching-simple-metadata-to-types/70131)

<div class="topic-metadata">

**Author:** [@Jae-Mo\_Lihm](https://discourse.julialang.org/u/Jae-Mo_Lihm)\
**Replies:** 1\
**Last updated:** [October 21, 2021, 7:25am UTC](https://discourse.julialang.org/t/attaching-simple-metadata-to-types/70131 "2021-10-21T07:25:16Z")

</div>

I want to create an object that behaves identically as some existing type (StructArrays in my case), but with some metadata. So x::StructArrayWithMeta, that does what StructArray does, and also has a x.meta1 field. Hav…

---

## [Flux model corresponding to PyTorch nn.BatchNorm1d](https://discourse.julialang.org/t/flux-model-corresponding-to-pytorch-nn-batchnorm1d/70125)

<div class="topic-metadata">

**Author:** [@RedDocMD](https://discourse.julialang.org/u/RedDocMD)\
**Replies:** 4\
**Last updated:** [October 21, 2021, 6:11am UTC](https://discourse.julialang.org/t/flux-model-corresponding-to-pytorch-nn-batchnorm1d/70125 "2021-10-21T06:11:13Z")

</div>

Flux provides several different normalization “models” to model normalization layers. Which one of them corresponds to the PyTorch’s nn.BatchNorm1d?

---

## [How to conduct multiple steps within Matlab using MATLAB.jl?](https://discourse.julialang.org/t/how-to-conduct-multiple-steps-within-matlab-using-matlab-jl/70116)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 1\
**Last updated:** [October 20, 2021, 10:59pm UTC](https://discourse.julialang.org/t/how-to-conduct-multiple-steps-within-matlab-using-matlab-jl/70116 "2021-10-20T22:59:17Z")

</div>

I have a Matlab table called T1 stored in the file F1. Below is what I’m trying to do using MATLAB.jl, but it does not work. What did I do wrong? using MATLAB F1 = "/Path/Test.mat"; @mput F1; eval\_string("load F1;"); ev…

---

## [How to format a float in annotate](https://discourse.julialang.org/t/how-to-format-a-float-in-annotate/70073)

<div class="topic-metadata">

**Author:** [@hdcpereira](https://discourse.julialang.org/u/hdcpereira)\
**Replies:** 2\
**Last updated:** [October 20, 2021, 9:09pm UTC](https://discourse.julialang.org/t/how-to-format-a-float-in-annotate/70073 "2021-10-20T21:09:32Z")

</div>

I’m trying to annotate something in a plot but i’m unable to format the floats i’m working with. I’m trying to change the precision of the float, is it possible with annotate or do I need to do it outside the annotate fu…

---

## [Has any one tried Julia on Windows 11?](https://discourse.julialang.org/t/has-any-one-tried-julia-on-windows-11/69530)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 3\
**Last updated:** [October 20, 2021, 9:58pm UTC](https://discourse.julialang.org/t/has-any-one-tried-julia-on-windows-11/69530 "2021-10-20T21:58:08Z")

</div>

MS has already started harassing me to update to W11. Has any one been brave enough to try it?

---

## [Problems with quotient modules (AbstractAlgebra)](https://discourse.julialang.org/t/problems-with-quotient-modules-abstractalgebra/70071)

<div class="topic-metadata">

**Author:** [@Gilles\_Dubois](https://discourse.julialang.org/u/Gilles_Dubois)\
**Replies:** 4\
**Last updated:** [October 20, 2021, 9:17pm UTC](https://discourse.julialang.org/t/problems-with-quotient-modules-abstractalgebra/70071 "2021-10-20T21:17:06Z")

</div>

Hi everybody ! Here’s the ‘coercions’ paragraph of the ‘modules’ chapter of AbstractAlgebra package doc. https://nemocas.github.io/AbstractAlgebra.jl/dev/module/ Coercions Given a module M and an element n of a modul…

---

## [Plotting basic bifurcation diagram using DiffEq and BifurcationKit.jl](https://discourse.julialang.org/t/plotting-basic-bifurcation-diagram-using-diffeq-and-bifurcationkit-jl/69957)

<div class="topic-metadata">

**Author:** [@affans](https://discourse.julialang.org/u/affans)\
**Replies:** 3\
**Last updated:** [October 20, 2021, 5:17pm UTC](https://discourse.julialang.org/t/plotting-basic-bifurcation-diagram-using-diffeq-and-bifurcationkit-jl/69957 "2021-10-20T17:17:02Z")

</div>

I am trying to plot a very basic bifurcation plot of my simple first order ODE. using DifferentialEquations using Gnuplot using BifurcationKit # this definition makes the dI a vector so have to send in vector initial c…

---

## [Ordering multivariate polynomials (AbstractAlgebra)](https://discourse.julialang.org/t/ordering-multivariate-polynomials-abstractalgebra/69779)

<div class="topic-metadata">

**Author:** [@Gilles\_Dubois](https://discourse.julialang.org/u/Gilles_Dubois)\
**Replies:** 4\
**Last updated:** [October 20, 2021, 7:50pm UTC](https://discourse.julialang.org/t/ordering-multivariate-polynomials-abstractalgebra/69779 "2021-10-20T19:50:05Z")

</div>

Bonjour à tous ! I’m working now with multivariate polynomials of the AbstractAlgebra package Everything works well, but I have a problem with ordering. To make simple let’s consider the case of only 2 variables say ‘…

---

## [Tuple size issues](https://discourse.julialang.org/t/tuple-size-issues/70107)

<div class="topic-metadata">

**Author:** [@Brock](https://discourse.julialang.org/u/Brock)\
**Replies:** 2\
**Last updated:** [October 20, 2021, 7:49pm UTC](https://discourse.julialang.org/t/tuple-size-issues/70107 "2021-10-20T19:49:59Z")

</div>

When I run a small size problem I don’t have issues but when my problem is larger my code crashes with some kind of exception error. I will paste the error below. I was able to isolate the issue. It is due to the size of…

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

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