# General Usage

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

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

**Page:** 681

---

## [What's the accepted way to ensure same integer behavior between 32-bit and 64-bit Julia?](https://discourse.julialang.org/t/whats-the-accepted-way-to-ensure-same-integer-behavior-between-32-bit-and-64-bit-julia/49564)

<div class="topic-metadata">

**Author:** [@Benny](https://discourse.julialang.org/u/Benny)\
**Replies:** 20\
**Last updated:** [November 7, 2020, 8:32pm UTC](https://discourse.julialang.org/t/whats-the-accepted-way-to-ensure-same-integer-behavior-between-32-bit-and-64-bit-julia/49564 "2020-11-07T20:32:20Z")

</div>

So far I’ve been writing things assuming 64-bit Julia. How do I ensure that integers work the same for 32-bit Julia, and is there a quick way to edit integer literals in existing code to do that? As an aside, why is the…

---

## [Effect of Column Major Storage on Multiplication](https://discourse.julialang.org/t/effect-of-column-major-storage-on-multiplication/49722)

<div class="topic-metadata">

**Author:** [@rakeshvar](https://discourse.julialang.org/u/rakeshvar)\
**Replies:** 3\
**Last updated:** [November 7, 2020, 8:19pm UTC](https://discourse.julialang.org/t/effect-of-column-major-storage-on-multiplication/49722 "2020-11-07T20:19:43Z")

</div>

Hello, I am multiplying a square matrix with a vector. I thought A '\* x would be faster than A \* x as the former is inner-product of x with columns of A, which are stored contiguously in Julia. As opposed to the latter …

---

## [Voila with WebIO.jl](https://discourse.julialang.org/t/voila-with-webio-jl/49747)

<div class="topic-metadata">

**Author:** [@Jojo\_Dad](https://discourse.julialang.org/u/Jojo_Dad)\
**Replies:** 0\
**Last updated:** [November 7, 2020, 5:02pm UTC](https://discourse.julialang.org/t/voila-with-webio-jl/49747 "2020-11-07T17:02:01Z")

</div>

Has anybody gotten Voila to work with WebIO? If so, what’s the trick?

---

## [How to load custom image dataset](https://discourse.julialang.org/t/how-to-load-custom-image-dataset/49739)

<div class="topic-metadata">

**Author:** [@Pranay\_Pokala](https://discourse.julialang.org/u/Pranay_Pokala)\
**Replies:** 0\
**Last updated:** [November 7, 2020, 3:22pm UTC](https://discourse.julialang.org/t/how-to-load-custom-image-dataset/49739 "2020-11-07T15:22:18Z")

</div>

I am trying to do image classification. I got data containing two folders train and test. In train there are two folders and test we have two folder which are classes . How to get the data and do image classification.

---

## [Parsing of file fails in CSV.jl in Julia 1.6 but not 1.5](https://discourse.julialang.org/t/parsing-of-file-fails-in-csv-jl-in-julia-1-6-but-not-1-5/49710)

<div class="topic-metadata">

**Author:** [@OvidiusCicero](https://discourse.julialang.org/u/OvidiusCicero)\
**Replies:** 3\
**Last updated:** [November 7, 2020, 7:35am UTC](https://discourse.julialang.org/t/parsing-of-file-fails-in-csv-jl-in-julia-1-6-but-not-1-5/49710 "2020-11-07T07:35:58Z")

</div>

Not sure where to put this, whether this is too early to submit and what this actually is but the following CSV file ObjectId,IdBundesland,Bundesland,Landkreis,Altersgruppe,Geschlecht,AnzahlFall,AnzahlTodesfall,Meldedat…

---

## [Argument which is an array of the same subtypes don't match array of super-type](https://discourse.julialang.org/t/argument-which-is-an-array-of-the-same-subtypes-dont-match-array-of-super-type/49712)

<div class="topic-metadata">

**Author:** [@purplishrock](https://discourse.julialang.org/u/purplishrock)\
**Replies:** 7\
**Last updated:** [November 7, 2020, 6:44am UTC](https://discourse.julialang.org/t/argument-which-is-an-array-of-the-same-subtypes-dont-match-array-of-super-type/49712 "2020-11-07T06:44:39Z")

</div>

The short version is that a function typed as function x1(Array{SuperType,1}) will throw an error if an argument which is an array of only subtypes is passed but not if the array is composed of elements with a mix of s…

---

## [Memory efficient melting and stacking? Reshaping Wide to Long](https://discourse.julialang.org/t/memory-efficient-melting-and-stacking-reshaping-wide-to-long/49657)

<div class="topic-metadata">

**Author:** [@Juan](https://discourse.julialang.org/u/Juan)\
**Replies:** 11\
**Last updated:** [November 7, 2020, 1:32am UTC](https://discourse.julialang.org/t/memory-efficient-melting-and-stacking-reshaping-wide-to-long/49657 "2020-11-07T01:32:37Z")

</div>

I need to reshape large dataframes from Wide to Long format. The input looks like this, with a unique ID per row, and multiple columns with a date in the name and multiple columns without the date. # R code my \<- data.…

---

## [Cyrillic symbols in comments](https://discourse.julialang.org/t/cyrillic-symbols-in-comments/49693)

<div class="topic-metadata">

**Author:** [@gvbelov](https://discourse.julialang.org/u/gvbelov)\
**Replies:** 13\
**Last updated:** [November 6, 2020, 8:27pm UTC](https://discourse.julialang.org/t/cyrillic-symbols-in-comments/49693 "2020-11-06T20:27:30Z")

</div>

When I use comments, typed in Cyrillic in a file (“hello.jl”) and load this file like that include(“hello.jl”), I have the error message: ERROR: LoadError: syntax: invalid UTF-8 syntax Example: println(“Hello !”) # Бул…

---

## [Findfirst(r"\\d",tmp) works but : findlast(r"\\d",tmp) ERROR: MethodError: no method matching findlast(::Regex, ::String)](https://discourse.julialang.org/t/findfirst-r-d-tmp-works-but-findlast-r-d-tmp-error-methoderror-no-method-matching-findlast-regex-string/49688)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 2\
**Last updated:** [November 6, 2020, 5:26pm UTC](https://discourse.julialang.org/t/findfirst-r-d-tmp-works-but-findlast-r-d-tmp-error-methoderror-no-method-matching-findlast-regex-string/49688 "2020-11-06T17:26:16Z")

</div>

What wrong ? julia\> tmp "\\":\\"83 053 wyś" julia\> findfirst(r"\\d",tmp) 4:4 julia\> findlast(r"\\d",tmp) ERROR: MethodError: no method matching findlast(::Regex, ::String) Closest candidates are: findlast(::Function, ::…

---

## [Suggestions to handle, smartly, a solution of a stochastic PDE](https://discourse.julialang.org/t/suggestions-to-handle-smartly-a-solution-of-a-stochastic-pde/49650)

<div class="topic-metadata">

**Author:** [@tiago](https://discourse.julialang.org/u/tiago)\
**Replies:** 6\
**Last updated:** [November 6, 2020, 4:43pm UTC](https://discourse.julialang.org/t/suggestions-to-handle-smartly-a-solution-of-a-stochastic-pde/49650 "2020-11-06T16:43:59Z")

</div>

Hello, I’m currently building a stochastic PDE solver based on a specific algorithm, under the theme of my master’s thesis. The main idea behind my code is simple, given some inputs (time span, physical domain, number …

---

## [Does Julia have a generic way to find nonzero elemements of arrays?](https://discourse.julialang.org/t/does-julia-have-a-generic-way-to-find-nonzero-elemements-of-arrays/49666)

<div class="topic-metadata">

**Author:** [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Replies:** 1\
**Last updated:** [November 6, 2020, 11:00am UTC](https://discourse.julialang.org/t/does-julia-have-a-generic-way-to-find-nonzero-elemements-of-arrays/49666 "2020-11-06T11:00:23Z")

</div>

In https://github.com/JuliaLang/julia/pull/38315#issuecomment-722623188 I suggested iterating over nonzero values as a possible efficient generic constructor for SparseMatrix I then proceed to realize that there isn’t su…

---

## [Transferring data structures between Julia files?](https://discourse.julialang.org/t/transferring-data-structures-between-julia-files/49636)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 8\
**Last updated:** [November 6, 2020, 8:08am UTC](https://discourse.julialang.org/t/transferring-data-structures-between-julia-files/49636 "2020-11-06T08:08:52Z")

</div>

I need to transfer information between two Julia files (or: between two Jupyter notebooks). Examples of data structures: A dictionary with keys “a”, “b”, “c”, etc., where the value for each key is a tuple holding Float…

---

## [Bit Manipulation Instruction Set](https://discourse.julialang.org/t/bit-manipulation-instruction-set/5368)

<div class="topic-metadata">

**Author:** [@greg\_plowman](https://discourse.julialang.org/u/greg_plowman)\
**Replies:** 9\
**Last updated:** [January 12, 2019, 12:05pm UTC](https://discourse.julialang.org/t/bit-manipulation-instruction-set/5368 "2019-01-12T12:05:21Z")

</div>

I saw on stackoverflow, there are “Parallel bit deposit and extract” instructions, which are part of BMI2 (Bit Manipulation Instruction Set 2). Are these instructions (PDEP and PEXT) available to Julia / LLVM? algorith…

---

## [CImGui and special characters (unicode)](https://discourse.julialang.org/t/cimgui-and-special-characters-unicode/49476)

<div class="topic-metadata">

**Author:** [@oheil](https://discourse.julialang.org/u/oheil)\
**Replies:** 10\
**Last updated:** [November 5, 2020, 7:01pm UTC](https://discourse.julialang.org/t/cimgui-and-special-characters-unicode/49476 "2020-11-05T19:01:28Z")

</div>

I try to display some unicode characters in CImGui, but I am failing. This is the simple code mainly from the demo.jl: using GLFW using ModernGL using CSyntax using CSyntax.CStatic using CImGui using CImGui.GLFWBacken…

---

## [CImGui Greek Characters](https://discourse.julialang.org/t/cimgui-greek-characters/28918)

<div class="topic-metadata">

**Author:** [@wiktorkujawa](https://discourse.julialang.org/u/wiktorkujawa)\
**Replies:** 6\
**Last updated:** [November 5, 2020, 7:10pm UTC](https://discourse.julialang.org/t/cimgui-greek-characters/28918 "2020-11-05T19:10:50Z")

</div>

Is possible to add some greek characters into CImGui text windows? I tried on demo example and I figured out that all the ttf files in fonts directory of CImGui packages are out of every language except latin chars, so …

---

## [Worse performance of LU-decomposition for Float32 than for Float64](https://discourse.julialang.org/t/worse-performance-of-lu-decomposition-for-float32-than-for-float64/49631)

<div class="topic-metadata">

**Author:** [@DavidBerghaus](https://discourse.julialang.org/u/DavidBerghaus)\
**Replies:** 7\
**Last updated:** [November 5, 2020, 5:26pm UTC](https://discourse.julialang.org/t/worse-performance-of-lu-decomposition-for-float32-than-for-float64/49631 "2020-11-05T17:26:05Z")

</div>

For some applications one might gain performance by using 32-bit arithmetic on a 64-bit system because this could improve memory-bandwidth as well as (possible) SIMD operations. I noticed however that some functions see…

---

## [Threads.@threads gives unexpected results](https://discourse.julialang.org/t/threads-threads-gives-unexpected-results/49628)

<div class="topic-metadata">

**Author:** [@O\_Julia](https://discourse.julialang.org/u/O_Julia)\
**Replies:** 3\
**Last updated:** [November 5, 2020, 4:20pm UTC](https://discourse.julialang.org/t/threads-threads-gives-unexpected-results/49628 "2020-11-05T16:20:47Z")

</div>

Hi, I am trying to optimize a simple function. I have written both devectorized and vectorized version codes for the function to see which one is faster. Here are the codes: Vectorized: function funvec(m::Int64,data::A…

---

## [Updating a variable every time step using NeuralPDE.jl and Physics-Informed NN](https://discourse.julialang.org/t/updating-a-variable-every-time-step-using-neuralpde-jl-and-physics-informed-nn/49621)

<div class="topic-metadata">

**Author:** [@Fathya.Salih](https://discourse.julialang.org/u/Fathya.Salih)\
**Replies:** 5\
**Last updated:** [November 5, 2020, 3:26pm UTC](https://discourse.julialang.org/t/updating-a-variable-every-time-step-using-neuralpde-jl-and-physics-informed-nn/49621 "2020-11-05T15:26:39Z")

</div>

Hey all, I am trying to solve a finite volume problem with PINN and I am having trouble defining one of the boundary conditions. I have a variable that depends on the value of the function and I want to assign values t…

---

## [Heatmap with NaNs in GR or GRUtils](https://discourse.julialang.org/t/heatmap-with-nans-in-gr-or-grutils/49584)

<div class="topic-metadata">

**Author:** [@kapple](https://discourse.julialang.org/u/kapple)\
**Replies:** 1\
**Last updated:** [November 5, 2020, 2:52pm UTC](https://discourse.julialang.org/t/heatmap-with-nans-in-gr-or-grutils/49584 "2020-11-05T14:52:49Z")

</div>

Hi again, I apologize for the proliferation of questions about plotting you may have seen from me here. I would like to plot a GR or GRUtils heatmap that omits plotting in certain regions. For example julia\> using GR …

---

## [Broadcast with \>3 parameters 30x slower](https://discourse.julialang.org/t/broadcast-with-3-parameters-30x-slower/49614)

<div class="topic-metadata">

**Author:** [@Yamen](https://discourse.julialang.org/u/Yamen)\
**Replies:** 6\
**Last updated:** [November 5, 2020, 12:38pm UTC](https://discourse.julialang.org/t/broadcast-with-3-parameters-30x-slower/49614 "2020-11-05T12:38:09Z")

</div>

Trying to understand this behaviour, once we go to 4+ entries it slows down dramatically. Understand I may need to add the specialisations for 4+ myself, but not sure where to start… a = rand(Bool, 100\_000) b = rand(Boo…

---

## [Inverse of a triangular matrix](https://discourse.julialang.org/t/inverse-of-a-triangular-matrix/49620)

<div class="topic-metadata">

**Author:** [@stla](https://discourse.julialang.org/u/stla)\
**Replies:** 2\
**Last updated:** [November 5, 2020, 11:11am UTC](https://discourse.julialang.org/t/inverse-of-a-triangular-matrix/49620 "2020-11-05T11:11:46Z")

</div>

Hello, Is there an optimized way to inverse a triangular matrix? I searched with Google, no luck.

---

## [Problem with ylims in Plots](https://discourse.julialang.org/t/problem-with-ylims-in-plots/49542)

<div class="topic-metadata">

**Author:** [@Dictino](https://discourse.julialang.org/u/Dictino)\
**Replies:** 10\
**Last updated:** [November 5, 2020, 9:37am UTC](https://discourse.julialang.org/t/problem-with-ylims-in-plots/49542 "2020-11-05T09:37:41Z")

</div>

I have problems with the ylims option of plots, in particular when i want to crop very big values of the input vector MWE: julia\> versioninfo() Julia Version 1.5.0 Commit 96786e22cc (2020-08-01 23:44 UTC) Platform Info:…

---

## [FAQ: solve diffrerential equation?](https://discourse.julialang.org/t/faq-solve-diffrerential-equation/49593)

<div class="topic-metadata">

**Author:** [@ZhouZhuofei](https://discourse.julialang.org/u/ZhouZhuofei)\
**Replies:** 5\
**Last updated:** [November 5, 2020, 7:54am UTC](https://discourse.julialang.org/t/faq-solve-diffrerential-equation/49593 "2020-11-05T07:54:51Z")

</div>

I have a function here: \\frac{dx}{dt} = kx(N-x) - lx(1-\\alpha\\frac{x}{N}) + \\sigma k x \\xi(t) \\xi(t) is Random perturbation term, \\sigma is the variance of it, k,l,N, \\alpha is a const. using Plots using Differentia…

---

## [Piping DataFrame rows](https://discourse.julialang.org/t/piping-dataframe-rows/49576)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 7\
**Last updated:** [November 5, 2020, 5:06am UTC](https://discourse.julialang.org/t/piping-dataframe-rows/49576 "2020-11-05T05:06:18Z")

</div>

@pipe eachrow( my\_DataFrame ) .|\> \_ This gives an error: “Objects of type DataFrameRow{DataFrame, DataFrames.Index} are not callable” It would be very useful to Pipe the rows of a DataFrame. Is there a way to avoi…

---

## [Linear solve in mixed precision koan](https://discourse.julialang.org/t/linear-solve-in-mixed-precision-koan/49594)

<div class="topic-metadata">

**Author:** [@ctkelley](https://discourse.julialang.org/u/ctkelley)\
**Replies:** 4\
**Last updated:** [November 5, 2020, 12:50am UTC](https://discourse.julialang.org/t/linear-solve-in-mixed-precision-koan/49594 "2020-11-05T00:50:22Z")

</div>

I want to store a matrix in Float32 and do several solves with a Float64 right hand sides. In LINPACK, (and I think LAPACK) this just works. In Matlab (see below) it’s less clear. However in something bizarre happens wi…

---

## [Can anyone suggest some package to built using CUDA.jl?](https://discourse.julialang.org/t/can-anyone-suggest-some-package-to-built-using-cuda-jl/49569)

<div class="topic-metadata">

**Author:** [@Manu\_Francis](https://discourse.julialang.org/u/Manu_Francis)\
**Replies:** 2\
**Last updated:** [November 5, 2020, 12:02am UTC](https://discourse.julialang.org/t/can-anyone-suggest-some-package-to-built-using-cuda-jl/49569 "2020-11-05T00:02:36Z")

</div>

Hi, I am trying to learn CUDA with julia… Can any one suggest some packages that I can refer to learn CUDA with julia ? Manu

---

## [Rand(10^8) runs ok, (10^9)...crashes and auto-restart Julia](https://discourse.julialang.org/t/rand-10-8-runs-ok-10-9-crashes-and-auto-restart-julia/49598)

<div class="topic-metadata">

**Author:** [@teriiju](https://discourse.julialang.org/u/teriiju)\
**Replies:** 9\
**Last updated:** [November 4, 2020, 9:57pm UTC](https://discourse.julialang.org/t/rand-10-8-runs-ok-10-9-crashes-and-auto-restart-julia/49598 "2020-11-04T21:57:34Z")

</div>

Running… rand(10^9) will lead my jupyter notebook session to crash and autorestart on my PC. Q : Is this a limit to be expected using Rand on a I3 - single thread - or are there workaround to push the rand() function…

---

## [Alternative way to install Jump](https://discourse.julialang.org/t/alternative-way-to-install-jump/49553)

<div class="topic-metadata">

**Author:** [@colt](https://discourse.julialang.org/u/colt)\
**Replies:** 7\
**Last updated:** [November 4, 2020, 8:57pm UTC](https://discourse.julialang.org/t/alternative-way-to-install-jump/49553 "2020-11-04T20:57:53Z")

</div>

Hello. I tried to install jump with: Pkg.add(“JuMP”) and received: WARNING: Pkg only works with git versions greater than v1.7.3 INFO: Initializing package repository /home/leopoldo/.julia/v0.3 INFO: Cloning META…

---

## [Can't instantiate project with two unregistered packages](https://discourse.julialang.org/t/cant-instantiate-project-with-two-unregistered-packages/36703)

<div class="topic-metadata">

**Author:** [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Replies:** 8\
**Last updated:** [November 4, 2020, 3:45pm UTC](https://discourse.julialang.org/t/cant-instantiate-project-with-two-unregistered-packages/36703 "2020-11-04T15:45:51Z")

</div>

I’m not sure what I’m missing but I’m having problems setting up a Julia project, as follows: I started the project on my Mac the project uses two unregistered packages: GitHub - GenieFramework/Stipple.jl: The reactiv…

---

## [How to use \`heatmap\` in GR.jl](https://discourse.julialang.org/t/how-to-use-heatmap-in-gr-jl/49507)

<div class="topic-metadata">

**Author:** [@kapple](https://discourse.julialang.org/u/kapple)\
**Replies:** 17\
**Last updated:** [November 4, 2020, 12:44pm UTC](https://discourse.julialang.org/t/how-to-use-heatmap-in-gr-jl/49507 "2020-11-04T12:44:09Z")

</div>

Why does this not work? julia\> using GR julia\> heatmap(\[1 2\], \[3 4\], \[5 6; 7 8\]) ERROR: AssertionError: length(x) == dimx + 1 && length(y) == dimy + 1 Stacktrace: \[1\] nonuniformcellarray(::Array{Int64,2}, ::Array{Int6…

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

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