# General Usage

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

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

**Page:** 504

---

## [Issubset() but order matters](https://discourse.julialang.org/t/issubset-but-order-matters/73636)

<div class="topic-metadata">

**Author:** [@Renan\_Rabelo](https://discourse.julialang.org/u/Renan_Rabelo)\
**Replies:** 5\
**Last updated:** [December 26, 2021, 2:30pm UTC](https://discourse.julialang.org/t/issubset-but-order-matters/73636 "2021-12-26T14:30:53Z")

</div>

Is there a function that returns true or false whenever one vector is a subvector from another? issubset() does not implies order. Thanks!

---

## [Us novices also want moar speed](https://discourse.julialang.org/t/us-novices-also-want-moar-speed/73510)

<div class="topic-metadata">

**Author:** [@g2g](https://discourse.julialang.org/u/g2g)\
**Replies:** 5\
**Last updated:** [December 26, 2021, 2:28pm UTC](https://discourse.julialang.org/t/us-novices-also-want-moar-speed/73510 "2021-12-26T14:28:10Z")

</div>

The following outline of an example would have helped me as I was trying to learn just enough of Julia’s parallel processing capabilities to speed up the generation of about 6000 frames in a 3D plot animation, which was …

---

## [Setup for Module/Package Testing](https://discourse.julialang.org/t/setup-for-module-package-testing/49236)

<div class="topic-metadata">

**Author:** [@Brad\_Carman](https://discourse.julialang.org/u/Brad_Carman)\
**Replies:** 6\
**Last updated:** [December 26, 2021, 12:46pm UTC](https://discourse.julialang.org/t/setup-for-module-package-testing/49236 "2021-12-26T12:46:14Z")

</div>

I’m developing a private package and I’m curious what the recommend process is. I started with the idea of using Pkg.develop(path=“path to my package”) but I’ve noticed that with this method I often need to restart the …

---

## [Cant find order](https://discourse.julialang.org/t/cant-find-order/73637)

<div class="topic-metadata">

**Author:** [@JackStrauss](https://discourse.julialang.org/u/JackStrauss)\
**Replies:** 2\
**Last updated:** [December 26, 2021, 8:51am UTC](https://discourse.julialang.org/t/cant-find-order/73637 "2021-12-26T08:51:06Z")

</div>

Hello everybody Julia has order() which seems to be used for sorting dataframes. But my search skills have failed me in finding a function that gives me the order of elements in a vector. Like order(\[10.2,-3,5\]) give…

---

## [Why is Julia not inferring the output type of f(x,y)=x+y?](https://discourse.julialang.org/t/why-is-julia-not-inferring-the-output-type-of-f-x-y-x-y/73634)

<div class="topic-metadata">

**Author:** [@vedantroy](https://discourse.julialang.org/u/vedantroy)\
**Replies:** 11\
**Last updated:** [December 26, 2021, 6:27am UTC](https://discourse.julialang.org/t/why-is-julia-not-inferring-the-output-type-of-f-x-y-x-y/73634 "2021-12-26T06:27:55Z")

</div>

I’m playing around with type inference in Julia. I have the following simple function: f(x,y) = x+y function q2() x = Number\[1.0,3\] a = 4 b = 2 c = f(x\[1\],a) d = f(b,c) f(d,x\[2\]) end @code\_warntype q2() He…

---

## [General subscripts in symbols?](https://discourse.julialang.org/t/general-subscripts-in-symbols/73633)

<div class="topic-metadata">

**Author:** [@RobertN](https://discourse.julialang.org/u/RobertN)\
**Replies:** 4\
**Last updated:** [December 26, 2021, 5:57am UTC](https://discourse.julialang.org/t/general-subscripts-in-symbols/73633 "2021-12-26T05:57:00Z")

</div>

I was just playing around with subscripts in symbol names: Δx₂ = 123 It’s cool that you can do this, but I’m restricted to Unicode it seems. I’m curious, is there a way to write a general subscript? Like the way you c…

---

## [Why does using + instead of += double the number of allocations?](https://discourse.julialang.org/t/why-does-using-instead-of-double-the-number-of-allocations/73630)

<div class="topic-metadata">

**Author:** [@vedantroy](https://discourse.julialang.org/u/vedantroy)\
**Replies:** 3\
**Last updated:** [December 26, 2021, 12:50am UTC](https://discourse.julialang.org/t/why-does-using-instead-of-double-the-number-of-allocations/73630 "2021-12-26T00:50:02Z")

</div>

I have the following code that I’m playing around with (taken from here): function vectorized() a = \[1.0, 1.0\] b = \[2.0, 2.0\] x = \[0, 0\] for i in 1:1000 x = a + b end return x end @bti…

---

## [@eval all statements into module](https://discourse.julialang.org/t/eval-all-statements-into-module/73628)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 0\
**Last updated:** [December 25, 2021, 11:49pm UTC](https://discourse.julialang.org/t/eval-all-statements-into-module/73628 "2021-12-25T23:49:58Z")

</div>

Is it possible to change the repl state so that all following expressions are evaluated inside a module, without manually prefixing it with @eval M?

---

## [Can I do this syntax in Julia when specifying types and default values for functions?](https://discourse.julialang.org/t/can-i-do-this-syntax-in-julia-when-specifying-types-and-default-values-for-functions/73606)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 9\
**Last updated:** [December 25, 2021, 10:00pm UTC](https://discourse.julialang.org/t/can-i-do-this-syntax-in-julia-when-specifying-types-and-default-values-for-functions/73606 "2021-12-25T22:00:55Z")

</div>

Hi! The newest version of Matlab (Function Argument Validation - MATLAB & Simulink - MathWorks Nordic) has this capability: function c = f(a, b,c) arguments a uint32 b uint32 c uint32 = a .\*…

---

## [Tab completion of more than one Unicode character at a time](https://discourse.julialang.org/t/tab-completion-of-more-than-one-unicode-character-at-a-time/73505)

<div class="topic-metadata">

**Author:** [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Replies:** 10\
**Last updated:** [December 25, 2021, 4:03pm UTC](https://discourse.julialang.org/t/tab-completion-of-more-than-one-unicode-character-at-a-time/73505 "2021-12-25T16:03:18Z")

</div>

Is there a way to type this variable xᵢ₊₁ without having to manually tab complete each separate character: x\\\_i TAB \\\_+ TAB \\\_1 TAB? In Latex this would be x\_{i+1}. Is there an equivalent in Julia?

---

## [Installing QML.jl](https://discourse.julialang.org/t/installing-qml-jl/533)

<div class="topic-metadata">

**Author:** [@barche](https://discourse.julialang.org/u/barche)\
**Replies:** 10\
**Last updated:** [December 25, 2021, 12:53pm UTC](https://discourse.julialang.org/t/installing-qml-jl/533 "2021-12-25T12:53:49Z")

</div>

@jtravs To my surprise, the new test binaries to prepare for the release worked on my wife’s PC (win10, 64 bit Julia 0.5), following the Readme: Pkg.clone("https://github.com/barche/QML.jl.git") Pkg.build("QML") Pkg.te…

---

## [How to use a variable of \`Symbol\` type as a argument when using @eval to define function?](https://discourse.julialang.org/t/how-to-use-a-variable-of-symbol-type-as-a-argument-when-using-eval-to-define-function/73586)

<div class="topic-metadata">

**Author:** [@timacro](https://discourse.julialang.org/u/timacro)\
**Replies:** 4\
**Last updated:** [December 25, 2021, 2:04am UTC](https://discourse.julialang.org/t/how-to-use-a-variable-of-symbol-type-as-a-argument-when-using-eval-to-define-function/73586 "2021-12-25T02:04:12Z")

</div>

I try to use @eval to generate a function, with a Symbol as its argument, the following code works good: arg = :(a::String) @eval function hello($arg) print($arg) end got a function signature as hello(a::String) ..…

---

## [3d shape datasets in Julia?](https://discourse.julialang.org/t/3d-shape-datasets-in-julia/73594)

<div class="topic-metadata">

**Author:** [@DeepQ](https://discourse.julialang.org/u/DeepQ)\
**Replies:** 0\
**Last updated:** [December 24, 2021, 7:39pm UTC](https://discourse.julialang.org/t/3d-shape-datasets-in-julia/73594 "2021-12-24T19:39:22Z")

</div>

I want to use neural networks to create 3d shapes using Eikonal equation. I want to know where I could find small 3d datasets.

---

## [Trilinear interpolation in Julia?](https://discourse.julialang.org/t/trilinear-interpolation-in-julia/73547)

<div class="topic-metadata">

**Author:** [@DeepQ](https://discourse.julialang.org/u/DeepQ)\
**Replies:** 5\
**Last updated:** [December 24, 2021, 12:10pm UTC](https://discourse.julialang.org/t/trilinear-interpolation-in-julia/73547 "2021-12-24T12:10:41Z")

</div>

I need a package for graphics applications. Which package contains spatial mappings such as trilinear interpolation?

---

## [Julia in atom and jupyter notebook](https://discourse.julialang.org/t/julia-in-atom-and-jupyter-notebook/73576)

<div class="topic-metadata">

**Author:** [@Xuekui\_wang](https://discourse.julialang.org/u/Xuekui_wang)\
**Replies:** 0\
**Last updated:** [December 24, 2021, 8:05am UTC](https://discourse.julialang.org/t/julia-in-atom-and-jupyter-notebook/73576 "2021-12-24T08:05:25Z")

</div>

Now, I am using julia 1.6.3 in atom, everything is ok. When I add IJulia in REPL of atom, and jupyter notebook also was installed. then I build IJulia and used notebook for julia. However, everything in notebook was no…

---

## [Model issue: Model(Flux) return same output every time in Genie.jl](https://discourse.julialang.org/t/model-issue-model-flux-return-same-output-every-time-in-genie-jl/73528)

<div class="topic-metadata">

**Author:** [@Ashwani\_Rathee](https://discourse.julialang.org/u/Ashwani_Rathee)\
**Replies:** 1\
**Last updated:** [December 24, 2021, 7:38am UTC](https://discourse.julialang.org/t/model-issue-model-flux-return-same-output-every-time-in-genie-jl/73528 "2021-12-24T07:38:54Z")

</div>

I have been working on a real time speech recogniser system which can be used to play snakegame which uses Flux.jl, PortAudio.jl, GameZero.jl, Genie.jl and good amount of image and sound packages. But this genie model de…

---

## [StackOverflowError() while compiling a package with PackageCompiler.jl](https://discourse.julialang.org/t/stackoverflowerror-while-compiling-a-package-with-packagecompiler-jl/73571)

<div class="topic-metadata">

**Author:** [@guilhermebodin](https://discourse.julialang.org/u/guilhermebodin)\
**Replies:** 1\
**Last updated:** [December 24, 2021, 7:02am UTC](https://discourse.julialang.org/t/stackoverflowerror-while-compiling-a-package-with-packagecompiler-jl/73571 "2021-12-24T07:02:24Z")

</div>

Hello, I am trying to compile a private package and got this error StackOverflowError() \_ZNK4llvm5Value20stripInBoundsOffsetsENS\_12function\_refIFvPKS0\_EEE at C:\\Users\\guilhermebodin\\AppData\\Local\\Programs\\Julia-1.6.4\\bi…

---

## [Functions vs let](https://discourse.julialang.org/t/functions-vs-let/73573)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 1\
**Last updated:** [December 24, 2021, 4:26am UTC](https://discourse.julialang.org/t/functions-vs-let/73573 "2021-12-24T04:26:59Z")

</div>

They say don’t calculate in global scope, do it inside functions instead. Is let good enough for this purpose, so I don’t need to define and call a function?

---

## [Issue with LSTM with Flux](https://discourse.julialang.org/t/issue-with-lstm-with-flux/73563)

<div class="topic-metadata">

**Author:** [@Vishal\_Sharma1](https://discourse.julialang.org/u/Vishal_Sharma1)\
**Replies:** 0\
**Last updated:** [December 23, 2021, 11:54pm UTC](https://discourse.julialang.org/t/issue-with-lstm-with-flux/73563 "2021-12-23T23:54:41Z")

</div>

I am new to Flux and trying to get LSTM model for a time series prediction working but currently stuck at an error which I dont seem to understand. train\_data, train\_labels, test\_data, test\_labels = getData(df) model …

---

## [Simplify with Symbolics.jl](https://discourse.julialang.org/t/simplify-with-symbolics-jl/73545)

<div class="topic-metadata">

**Author:** [@sungj](https://discourse.julialang.org/u/sungj)\
**Replies:** 2\
**Last updated:** [December 23, 2021, 10:32pm UTC](https://discourse.julialang.org/t/simplify-with-symbolics-jl/73545 "2021-12-23T22:32:13Z")

</div>

Hi, How can I simplify this simple expression? julia\> using Symbolics julia\> @variables x, y, z 3-element Vector{Num}: x y z julia\> simplify( cos(x)^2\*cos(y)^2\*cos(z)^2 + cos(x)^2\*sin(y)^2\*cos(z)^2 ) (cos(x)^2)\*(c…

---

## [On creating subpackage correctly- specific case](https://discourse.julialang.org/t/on-creating-subpackage-correctly-specific-case/73543)

<div class="topic-metadata">

**Author:** [@yewalenikhil65](https://discourse.julialang.org/u/yewalenikhil65)\
**Replies:** 3\
**Last updated:** [December 23, 2021, 8:02pm UTC](https://discourse.julialang.org/t/on-creating-subpackage-correctly-specific-case/73543 "2021-12-23T20:02:42Z")

</div>

How do one avoid re-importing (dont want to use using dep\_package\_1 more than once) a dependency in case of creating a sub-package: situation in detail as follows: module mypackage using dep\_package\_1 # dependency …

---

## [Instructions to install GMT.jl on Ubuntu](https://discourse.julialang.org/t/instructions-to-install-gmt-jl-on-ubuntu/73486)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 13\
**Last updated:** [December 23, 2021, 7:54pm UTC](https://discourse.julialang.org/t/instructions-to-install-gmt-jl-on-ubuntu/73486 "2021-12-23T19:54:14Z")

</div>

Is this the correct way of installing GMT.jl on Ubuntu? https://github.com/GenericMappingTools/gmt/blob/master/BUILDING.md#build-and-runtime-dependencies It seems there are a lot of manual steps.

---

## [How to set the environment variable MATLAB\_ROOT when installing MATLAB.jl?](https://discourse.julialang.org/t/how-to-set-the-environment-variable-matlab-root-when-installing-matlab-jl/73536)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 2\
**Last updated:** [December 23, 2021, 4:56pm UTC](https://discourse.julialang.org/t/how-to-set-the-environment-variable-matlab-root-when-installing-matlab-jl/73536 "2021-12-23T16:56:59Z")

</div>

My goal is to install MATLAB.jl package. The instructions say the below" “By default, MATLAB.jl uses the MATLAB installation with the greatest version number. To specify that a specific MATLAB installation should be use…

---

## [How to simulate friends on a GridSpace in Agents.jl](https://discourse.julialang.org/t/how-to-simulate-friends-on-a-gridspace-in-agents-jl/73484)

<div class="topic-metadata">

**Author:** [@sbacelar](https://discourse.julialang.org/u/sbacelar)\
**Replies:** 4\
**Last updated:** [December 23, 2021, 6:54pm UTC](https://discourse.julialang.org/t/how-to-simulate-friends-on-a-gridspace-in-agents-jl/73484 "2021-12-23T18:54:22Z")

</div>

I am using Agents.jl and I want to create for each agent a list of (the ids) other agents that are his friends. I am working on a GridSpace (not in a GraphSpace). For each agent, the list of friends has a random size be…

---

## [How do a I get a type "stripped" of parameters?](https://discourse.julialang.org/t/how-do-a-i-get-a-type-stripped-of-parameters/73465)

<div class="topic-metadata">

**Author:** [@ablaom](https://discourse.julialang.org/u/ablaom)\
**Replies:** 10\
**Last updated:** [December 23, 2021, 6:15pm UTC](https://discourse.julialang.org/t/how-do-a-i-get-a-type-stripped-of-parameters/73465 "2021-12-23T18:15:47Z")

</div>

struct Foo{T} end What function takes Foo{Int} and returns the parent UnionAll type, Foo?

---

## [Brackets on structures Julia](https://discourse.julialang.org/t/brackets-on-structures-julia/73532)

<div class="topic-metadata">

**Author:** [@Leticia-maria](https://discourse.julialang.org/u/Leticia-maria)\
**Replies:** 1\
**Last updated:** [December 23, 2021, 2:17pm UTC](https://discourse.julialang.org/t/brackets-on-structures-julia/73532 "2021-12-23T14:17:12Z")

</div>

what means this brackets on struct?: struct Graph{T} adjacency\_lists :: Dict{T, Set{T}} edge\_weights :: Dict{Tuple{T, T}, Float64} end

---

## [Pluto: Get current notebook file path](https://discourse.julialang.org/t/pluto-get-current-notebook-file-path/60543)

<div class="topic-metadata">

**Author:** [@maajdl](https://discourse.julialang.org/u/maajdl)\
**Replies:** 11\
**Last updated:** [December 23, 2021, 1:39pm UTC](https://discourse.julialang.org/t/pluto-get-current-notebook-file-path/60543 "2021-12-23T13:39:17Z")

</div>

Hello, I would like to get the filepath for the current Pluto notebook. Is there a way to get this information? Thanks Michel PS: My purpose is to write a SaveAsIpynb function that would keep a Jupyter notebook cop…

---

## [Extension of ^-operator for Vector{Vector{Real}}](https://discourse.julialang.org/t/extension-of-operator-for-vector-vector-real/73523)

<div class="topic-metadata">

**Author:** [@Volker](https://discourse.julialang.org/u/Volker)\
**Replies:** 4\
**Last updated:** [December 23, 2021, 12:39pm UTC](https://discourse.julialang.org/t/extension-of-operator-for-vector-vector-real/73523 "2021-12-23T12:39:45Z")

</div>

Hi, I would like to extend the ^-operator for Vector{Vector{Real}}. I tried the following implementation, but I get an error message :MethodError: no method matching ^(::Vector{Vector{Int16}}, ::Int64). import Base:^ …

---

## [How to debug internal runtime error?](https://discourse.julialang.org/t/how-to-debug-internal-runtime-error/73511)

<div class="topic-metadata">

**Author:** [@grahamas](https://discourse.julialang.org/u/grahamas)\
**Replies:** 4\
**Last updated:** [December 23, 2021, 7:11am UTC](https://discourse.julialang.org/t/how-to-debug-internal-runtime-error/73511 "2021-12-23T07:11:02Z")

</div>

Can anyone point me to how to find the source of a runtime error? Meaning, is there some tool I can use to interrogate this, like I would with @code\_typed or a debugger, if it weren’t a runtime error? I’m struggling to …

---

## [Rotate grid in plots](https://discourse.julialang.org/t/rotate-grid-in-plots/73454)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 7\
**Last updated:** [December 23, 2021, 9:42am UTC](https://discourse.julialang.org/t/rotate-grid-in-plots/73454 "2021-12-23T09:42:45Z")

</div>

I would like to superimpose a rotated grid to represent an alternative coordinate system in a plot. Right now I essentially translate an angle to a slope and plot the lines. When the angle parameter theta is zero, the gr…

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

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