# General Usage

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

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

**Page:** 522

---

## [Computer specific slowdown on multi-threading on computer cluster (Linux)?](https://discourse.julialang.org/t/computer-specific-slowdown-on-multi-threading-on-computer-cluster-linux/57889)

<div class="topic-metadata">

**Author:** [@swishmas](https://discourse.julialang.org/u/swishmas)\
**Replies:** 27\
**Last updated:** [November 11, 2021, 1:44pm UTC](https://discourse.julialang.org/t/computer-specific-slowdown-on-multi-threading-on-computer-cluster-linux/57889 "2021-11-11T13:44:41Z")

</div>

I have a code that runs very fast on my laptop (~20 seconds). As a test, I put it onto a new cluster that I started using. The code took 30 minutes to run. This code uses a lot of multi-threading in a lot of places. I…

---

## [One element vector cannot be used to multiply another vector/matrix](https://discourse.julialang.org/t/one-element-vector-cannot-be-used-to-multiply-another-vector-matrix/71256)

<div class="topic-metadata">

**Author:** [@Fred\_He](https://discourse.julialang.org/u/Fred_He)\
**Replies:** 6\
**Last updated:** [November 11, 2021, 12:48pm UTC](https://discourse.julialang.org/t/one-element-vector-cannot-be-used-to-multiply-another-vector-matrix/71256 "2021-11-11T12:48:43Z")

</div>

rand(1,3)\*rand(3) is possible, and returns a 1-element vector but rand(1,3)\*rand(3)\*(another matrix) is usually not possible, rand(1,3)\*rand(3)\*rand(3) gives error: MethodError: no method matching \*(::Vector{Float64}…

---

## [Julia cannot find the module file in the same directory of the main file](https://discourse.julialang.org/t/julia-cannot-find-the-module-file-in-the-same-directory-of-the-main-file/71213)

<div class="topic-metadata">

**Author:** [@Adam\_D](https://discourse.julialang.org/u/Adam_D)\
**Replies:** 3\
**Last updated:** [November 11, 2021, 12:23pm UTC](https://discourse.julialang.org/t/julia-cannot-find-the-module-file-in-the-same-directory-of-the-main-file/71213 "2021-11-11T12:23:02Z")

</div>

Hi all, I have script named “main.jl” that uses a module written by me named “PmFunc.jl”. I call PmFunc module within main.jl using "using PmFunc. Both of these files are in the same folder. To make sure that the folder…

---

## [Wrong results when I use @btime](https://discourse.julialang.org/t/wrong-results-when-i-use-btime/71324)

<div class="topic-metadata">

**Author:** [@Niceno](https://discourse.julialang.org/u/Niceno)\
**Replies:** 5\
**Last updated:** [November 11, 2021, 10:57am UTC](https://discourse.julialang.org/t/wrong-results-when-i-use-btime/71324 "2021-11-11T10:57:40Z")

</div>

Dear all, I am quite baffled by the results I get when using @btime. I was following this simple lecture: https://cuda.juliagpu.org/stable/tutorials/introduction/ and just by copying and pasting from this page to a Jul…

---

## [How to add keyword arguments to extended functions (Base.print)?](https://discourse.julialang.org/t/how-to-add-keyword-arguments-to-extended-functions-base-print/71250)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 5\
**Last updated:** [November 11, 2021, 7:29am UTC](https://discourse.julialang.org/t/how-to-add-keyword-arguments-to-extended-functions-base-print/71250 "2021-11-11T07:29:30Z")

</div>

I want to custom the print of my own object, but with an optional keyword argument. However when I then call my customised print using the keyword argument Julia tells me it couldn’t find it. I already know that keyword …

---

## [Convert JPG image to pixel values](https://discourse.julialang.org/t/convert-jpg-image-to-pixel-values/71302)

<div class="topic-metadata">

**Author:** [@tgautam03](https://discourse.julialang.org/u/tgautam03)\
**Replies:** 2\
**Last updated:** [November 11, 2021, 5:55am UTC](https://discourse.julialang.org/t/convert-jpg-image-to-pixel-values/71302 "2021-11-11T05:55:59Z")

</div>

Hi, I’m using Images package to convert JPG image to an array with pixel values. I first loaded the image and then used channelview but I’m getting some weird values in the array. Can someone tell me how to convert this …

---

## [PyCall jumping from python to julia to python error](https://discourse.julialang.org/t/pycall-jumping-from-python-to-julia-to-python-error/71306)

<div class="topic-metadata">

**Author:** [@flytortgua](https://discourse.julialang.org/u/flytortgua)\
**Replies:** 0\
**Last updated:** [November 11, 2021, 4:58am UTC](https://discourse.julialang.org/t/pycall-jumping-from-python-to-julia-to-python-error/71306 "2021-11-11T04:58:06Z")

</div>

Hello, I have a backend algorithm which makes julia calls, I do this via the PyCall package. however, one of the packages in julia recently updated, and it itself makes use of PyCall. no mater what I try to do, I alwa…

---

## [Plotting figures and updating in loop](https://discourse.julialang.org/t/plotting-figures-and-updating-in-loop/71117)

<div class="topic-metadata">

**Author:** [@Sbeltranj](https://discourse.julialang.org/u/Sbeltranj)\
**Replies:** 5\
**Last updated:** [November 11, 2021, 1:16am UTC](https://discourse.julialang.org/t/plotting-figures-and-updating-in-loop/71117 "2021-11-11T01:16:20Z")

</div>

Hi, I want to create plots of a function in a for loop, in separate windows (p1, p2), but it is displayed in a single window. I used MATLAB and there I used figure (), to create empty figures. in this case I have used p…

---

## [Conditional for function](https://discourse.julialang.org/t/conditional-for-function/71296)

<div class="topic-metadata">

**Author:** [@Sbeltranj](https://discourse.julialang.org/u/Sbeltranj)\
**Replies:** 3\
**Last updated:** [November 11, 2021, 1:11am UTC](https://discourse.julialang.org/t/conditional-for-function/71296 "2021-11-11T01:11:18Z")

</div>

Hi, I have a conditional inside the for loop, the conditional changes the function in each loop, but first i get the error “qxloc is not defined” so add qxloc (x) = nothing; but this does not solve the problem and the c…

---

## [What is a curl error?](https://discourse.julialang.org/t/what-is-a-curl-error/71291)

<div class="topic-metadata">

**Author:** [@ctkelley](https://discourse.julialang.org/u/ctkelley)\
**Replies:** 3\
**Last updated:** [November 10, 2021, 10:48pm UTC](https://discourse.julialang.org/t/what-is-a-curl-error/71291 "2021-11-10T22:48:13Z")

</div>

I just tried to install GoldenSequences on two of my computers and got a message I do not understand. The error I saw first was a stream of identical messages like this ┌ Error: curl\_easy\_setopt: 48 └ @ Downloads.Curl …

---

## [Makie \`convert\_arguments\`](https://discourse.julialang.org/t/makie-convert-arguments/71270)

<div class="topic-metadata">

**Author:** [@circonflexe](https://discourse.julialang.org/u/circonflexe)\
**Replies:** 4\
**Last updated:** [November 10, 2021, 10:46pm UTC](https://discourse.julialang.org/t/makie-convert-arguments/71270 "2021-11-10T22:46:21Z")

</div>

So I am trying to extend Makie plotting to some types of my own. According to the (very terse) online documentation it is sufficient to define a new method for convert\_arguments: using GLMakie using StaticArrays struct…

---

## [Using PyCall on different threads crashes my Julia REPL](https://discourse.julialang.org/t/using-pycall-on-different-threads-crashes-my-julia-repl/71266)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 3\
**Last updated:** [November 10, 2021, 9:28pm UTC](https://discourse.julialang.org/t/using-pycall-on-different-threads-crashes-my-julia-repl/71266 "2021-11-10T21:28:58Z")

</div>

Hi all :slight\_smile: the following two lines crashes my Julia REPL. julia\> using PyCall julia\> \[Threads.@spawn py"sum(i for i in range(10\_000\_000))" for i in 1:10\] Anyone with the same experience? Does anyone know w…

---

## [LoadError: expected package to have a \`name\`-entry?](https://discourse.julialang.org/t/loaderror-expected-package-to-have-a-name-entry/71276)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 19\
**Last updated:** [November 10, 2021, 8:42pm UTC](https://discourse.julialang.org/t/loaderror-expected-package-to-have-a-name-entry/71276 "2021-11-10T20:42:48Z")

</div>

I want to make an executable file. When I start the compilation, I get the below error: ┌ Warning: it is not recommended to create an app/library without a preexisting manifest └ @ PackageCompiler C:\\Users\\amroa\\.julia\\…

---

## [Why this dataframes.jl example uses a semicolon at the beginning?](https://discourse.julialang.org/t/why-this-dataframes-jl-example-uses-a-semicolon-at-the-beginning/71223)

<div class="topic-metadata">

**Author:** [@Juan](https://discourse.julialang.org/u/Juan)\
**Replies:** 7\
**Last updated:** [November 10, 2021, 6:39pm UTC](https://discourse.julialang.org/t/why-this-dataframes-jl-example-uses-a-semicolon-at-the-beginning/71223 "2021-11-10T18:39:28Z")

</div>

I was reading some examples (from https://bkamins.github.io) about how to use DataFrames.jl to select, filter, combine… and I have a question. df = DataFrame( id = 1:4, name = \["Aaron Aardvark", "Belen Barboza", "E…

---

## [Apply some functions to columns of a dataframe](https://discourse.julialang.org/t/apply-some-functions-to-columns-of-a-dataframe/71216)

<div class="topic-metadata">

**Author:** [@corny85](https://discourse.julialang.org/u/corny85)\
**Replies:** 5\
**Last updated:** [November 10, 2021, 12:25pm UTC](https://discourse.julialang.org/t/apply-some-functions-to-columns-of-a-dataframe/71216 "2021-11-10T12:25:22Z")

</div>

Hello, I’m a beginner in Julia. Here is my problem; i have: a dataframe with 4 columns and 10 rows 3 functions u1, u2, u3 a vector of 3 weights And i want to create a function (arguments : the dataframe, the 3 funct…

---

## [How to create executable file correctly?](https://discourse.julialang.org/t/how-to-create-executable-file-correctly/71175)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 1\
**Last updated:** [November 10, 2021, 4:02pm UTC](https://discourse.julialang.org/t/how-to-create-executable-file-correctly/71175 "2021-11-10T16:02:37Z")

</div>

I want to make executable file for a file called MyApp which is located in folder "../Create\_exe\_file/MyApp/src": I have created a project in “MyApp” folder using the below script: using Pkg Pkg.generate("../Creat…

---

## [Using of non exported functions of Base in package code](https://discourse.julialang.org/t/using-of-non-exported-functions-of-base-in-package-code/71225)

<div class="topic-metadata">

**Author:** [@f\_u](https://discourse.julialang.org/u/f_u)\
**Replies:** 7\
**Last updated:** [November 10, 2021, 2:37pm UTC](https://discourse.julialang.org/t/using-of-non-exported-functions-of-base-in-package-code/71225 "2021-11-10T14:37:06Z")

</div>

During the development of a package I needed some reflective informations of a Union datatype. I used the following formulation: Optional{T} = Union{Nothing, T} struct Address street::String town::String end str…

---

## [Understanding allocations in GeometryBasics.jl](https://discourse.julialang.org/t/understanding-allocations-in-geometrybasics-jl/71252)

<div class="topic-metadata">

**Author:** [@peremato](https://discourse.julialang.org/u/peremato)\
**Replies:** 6\
**Last updated:** [November 10, 2021, 2:19pm UTC](https://discourse.julialang.org/t/understanding-allocations-in-geometrybasics-jl/71252 "2021-11-10T14:19:20Z")

</div>

I am currently using GeometryBasics.jl for a project. While optimizing the code, I noticed lots of memory allocations that hinders performance. Some of them I could figure it out but this one I cannot. Can somebody help …

---

## [How to save and read a structure?](https://discourse.julialang.org/t/how-to-save-and-read-a-structure/71031)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 21\
**Last updated:** [November 10, 2021, 7:58am UTC](https://discourse.julialang.org/t/how-to-save-and-read-a-structure/71031 "2021-11-10T07:58:15Z")

</div>

I am trying to save my designed structure into a file. However, when I am trying to read it, its structure seems to be lost. Any idea how to maintain its structure and do it correctly? using FileIO, JLD mutable struct S…

---

## [DataFrames.jl data engineering performance compared with other softwares](https://discourse.julialang.org/t/dataframes-jl-data-engineering-performance-compared-with-other-softwares/71226)

<div class="topic-metadata">

**Author:** [@laut](https://discourse.julialang.org/u/laut)\
**Replies:** 6\
**Last updated:** [November 10, 2021, 7:26am UTC](https://discourse.julialang.org/t/dataframes-jl-data-engineering-performance-compared-with-other-softwares/71226 "2021-11-10T07:26:17Z")

</div>

Julia fares pretty well in these cross software comparisons https://h2oai.github.io/db-benchmark/

---

## [Convert 1-element Vector{Float64} in Float](https://discourse.julialang.org/t/convert-1-element-vector-float64-in-float/71242)

<div class="topic-metadata">

**Author:** [@Sbeltranj](https://discourse.julialang.org/u/Sbeltranj)\
**Replies:** 2\
**Last updated:** [November 10, 2021, 7:01am UTC](https://discourse.julialang.org/t/convert-1-element-vector-float64-in-float/71242 "2021-11-10T07:01:29Z")

</div>

Hi I want to convert a vector of 1 element, to a Float64, how to do it

---

## [Update on renaming registered packages](https://discourse.julialang.org/t/update-on-renaming-registered-packages/71240)

<div class="topic-metadata">

**Author:** [@fipelle](https://discourse.julialang.org/u/fipelle)\
**Replies:** 2\
**Last updated:** [November 10, 2021, 4:33am UTC](https://discourse.julialang.org/t/update-on-renaming-registered-packages/71240 "2021-11-10T04:33:47Z")

</div>

Hi, Quite a long time ago I posted a message on this forum asking whether it was possible to rename a registered package (Rename registered package). However, the responses (even in the linked discussions) where scarse. …

---

## [Juno IDE in atom causing REPL to go with weird dots as follows](https://discourse.julialang.org/t/juno-ide-in-atom-causing-repl-to-go-with-weird-dots-as-follows/71120)

<div class="topic-metadata">

**Author:** [@yewalenikhil65](https://discourse.julialang.org/u/yewalenikhil65)\
**Replies:** 2\
**Last updated:** [November 10, 2021, 3:08am UTC](https://discourse.julialang.org/t/juno-ide-in-atom-causing-repl-to-go-with-weird-dots-as-follows/71120 "2021-11-10T03:08:25Z")

</div>

Is anyone else facing this issue with Juno IDE In atom ? image as follows for the REPL In juno. This happens mostly after computer is left ‘suspended’ or on sleep mode and then resumed

---

## [DataFramesMeta questions](https://discourse.julialang.org/t/dataframesmeta-questions/69952)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 35\
**Last updated:** [November 10, 2021, 1:44am UTC](https://discourse.julialang.org/t/dataframesmeta-questions/69952 "2021-11-10T01:44:13Z")

</div>

Could groupby have a @ macro version, to avoid parenthesis? and the ability to define a column name within a groupby statement. Also, for a multi-line macro in a @chain block, followed by another macro - would it be p…

---

## [Why is advection\_shared! much faster than advection\_parallel!?](https://discourse.julialang.org/t/why-is-advection-shared-much-faster-than-advection-parallel/71231)

<div class="topic-metadata">

**Author:** [@DerongXu](https://discourse.julialang.org/u/DerongXu)\
**Replies:** 0\
**Last updated:** [November 9, 2021, 11:10pm UTC](https://discourse.julialang.org/t/why-is-advection-shared-much-faster-than-advection-parallel/71231 "2021-11-09T23:10:50Z")

</div>

Hi all, I am learning the parallel computing in Julia through the manual Multi-processing and Distributed Computing · The Julia Language In this page, why is advection\_shared! much faster than advection\_parallel! ? Bot…

---

## [Package Manager Errors - dev package dependencies](https://discourse.julialang.org/t/package-manager-errors-dev-package-dependencies/71227)

<div class="topic-metadata">

**Author:** [@dkzwart](https://discourse.julialang.org/u/dkzwart)\
**Replies:** 0\
**Last updated:** [November 9, 2021, 10:31pm UTC](https://discourse.julialang.org/t/package-manager-errors-dev-package-dependencies/71227 "2021-11-09T22:31:28Z")

</div>

I have been developing a few packages all in the dev directory. Some are dependent on others. PkgA has Pkg C in it’s dependencies. PkgC has PkgB in it’s dependencies. Currently to precompile PkgA, I need to do the follow…

---

## [Issue with Plots & LaTeX](https://discourse.julialang.org/t/issue-with-plots-latex/71045)

<div class="topic-metadata">

**Author:** [@dodoplus](https://discourse.julialang.org/u/dodoplus)\
**Replies:** 16\
**Last updated:** [November 9, 2021, 9:14pm UTC](https://discourse.julialang.org/t/issue-with-plots-latex/71045 "2021-11-09T21:14:23Z")

</div>

In the following code, the $ signs around the LaTeX text are printed. Quite sure that’s not the right behavior: using LaTeXStrings using Plots bar(rand(5)) title!(L"Testing LaTEX: $\\sigma=1.2$") Note that removing t…

---

## [LoadError: IOError: mkdir("./../output"; mode=0o777): permission denied (EACCES)](https://discourse.julialang.org/t/loaderror-ioerror-mkdir-output-mode-0o777-permission-denied-eacces/71222)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 4\
**Last updated:** [November 9, 2021, 8:28pm UTC](https://discourse.julialang.org/t/loaderror-ioerror-mkdir-output-mode-0o777-permission-denied-eacces/71222 "2021-11-09T20:28:53Z")

</div>

I was using JLD2 package to save my data properly as below: save("path/to/file.jld2", "N", N) now I started to have this error: ERROR: LoadError: IOError: mkdir("./../output"; mode=0o777): permission denied (EACCES) S…

---

## ["dev" version of docs not published](https://discourse.julialang.org/t/dev-version-of-docs-not-published/71218)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 3\
**Last updated:** [November 9, 2021, 8:05pm UTC](https://discourse.julialang.org/t/dev-version-of-docs-not-published/71218 "2021-11-09T20:05:58Z")

</div>

For some reason the dev version of the docs of one of my packages is not being published (Overview · CellListMap.jl) Some other packages do publish dev versions, and I have copied the ci.yml files from one to the other.…

---

## [VideoIO.jl - Way to directly record the dekstop?](https://discourse.julialang.org/t/videoio-jl-way-to-directly-record-the-dekstop/71221)

<div class="topic-metadata">

**Author:** [@Pytrator](https://discourse.julialang.org/u/Pytrator)\
**Replies:** 0\
**Last updated:** [November 9, 2021, 8:05pm UTC](https://discourse.julialang.org/t/videoio-jl-way-to-directly-record-the-dekstop/71221 "2021-11-09T20:05:03Z")

</div>

Hey there, i successfully tried to use the package with OBS-Studio by creating a virtual camera with it, that points to the desktop. It works great but in the package I build, I don’t want to depend on OBS-Studio. Is t…

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

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