# General Usage

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

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

**Page:** 430

---

## [Base.methods matches subtypes and supertypes](https://discourse.julialang.org/t/base-methods-matches-subtypes-and-supertypes/83525)

<div class="topic-metadata">

**Author:** [@tictaccat](https://discourse.julialang.org/u/tictaccat)\
**Replies:** 0\
**Last updated:** [June 29, 2022, 4:21pm UTC](https://discourse.julialang.org/t/base-methods-matches-subtypes-and-supertypes/83525 "2022-06-29T16:21:05Z")

</div>

Base.methods seems to return both subtypes and supertypes: julia\> f(x::Integer) = 3 f (generic function with 1 method) julia\> methods(f, (Number,)) # 1 method for generic function "f": \[1\] f(x::Integer) in Main at REPL…

---

## [Dictionary construction is quite slow?](https://discourse.julialang.org/t/dictionary-construction-is-quite-slow/83485)

<div class="topic-metadata">

**Author:** [@christmas\_jones](https://discourse.julialang.org/u/christmas_jones)\
**Replies:** 15\
**Last updated:** [June 29, 2022, 4:16pm UTC](https://discourse.julialang.org/t/dictionary-construction-is-quite-slow/83485 "2022-06-29T16:16:24Z")

</div>

Just comparing python to julia for dictionary construction, and it seems very slow. In my particular use case it is much worse even than the MWE below (where my keys are more complicated). So my question is, what is the…

---

## [How to create all possible k-mers with a set of alphabets?](https://discourse.julialang.org/t/how-to-create-all-possible-k-mers-with-a-set-of-alphabets/83186)

<div class="topic-metadata">

**Author:** [@Bharat\_Ravi](https://discourse.julialang.org/u/Bharat_Ravi)\
**Replies:** 12\
**Last updated:** [June 29, 2022, 4:07pm UTC](https://discourse.julialang.org/t/how-to-create-all-possible-k-mers-with-a-set-of-alphabets/83186 "2022-06-29T16:07:03Z")

</div>

I am trying to use Iterators.product to generate a list of all possible k-mers with a set of alphabets. Since I am a biologist, these letters happen to be the bases of DNA :smiley: : “ATGC” If I want to generate 3-me…

---

## [Julia Crashes withTerminal Process Error when excuting plotting functions from Agents.jl pkg](https://discourse.julialang.org/t/julia-crashes-withterminal-process-error-when-excuting-plotting-functions-from-agents-jl-pkg/73063)

<div class="topic-metadata">

**Author:** [@imantha](https://discourse.julialang.org/u/imantha)\
**Replies:** 15\
**Last updated:** [June 29, 2022, 11:52am UTC](https://discourse.julialang.org/t/julia-crashes-withterminal-process-error-when-excuting-plotting-functions-from-agents-jl-pkg/73063 "2022-06-29T11:52:39Z")

</div>

Hi, Julia crashes with the following error when I execute abm\_plot() or abm\_play() functions from agents.jl package. The terminal process "julia '-i', '--banner=no', '--project=/Users/imantha/.julia/environments/v1.7',…

---

## [Parsing an object as a Vector of parentmodule](https://discourse.julialang.org/t/parsing-an-object-as-a-vector-of-parentmodule/83511)

<div class="topic-metadata">

**Author:** [@ga72kud](https://discourse.julialang.org/u/ga72kud)\
**Replies:** 1\
**Last updated:** [June 29, 2022, 9:43am UTC](https://discourse.julialang.org/t/parsing-an-object-as-a-vector-of-parentmodule/83511 "2022-06-29T09:43:08Z")

</div>

I hope this question finds you well, and I hope I can explain the question adequately. I write a program where I pass a vector of objects (mutable struct) from one module to a submodule (child module). So I call a functi…

---

## [\[ANN\] Announcing GridapDistributed.jl - FEM on parallel supercomputers](https://discourse.julialang.org/t/ann-announcing-gridapdistributed-jl-fem-on-parallel-supercomputers/76138)

<div class="topic-metadata">

**Author:** [@amartinhuertas](https://discourse.julialang.org/u/amartinhuertas)\
**Replies:** 6\
**Last updated:** [June 29, 2022, 3:35am UTC](https://discourse.julialang.org/t/ann-announcing-gridapdistributed-jl-fem-on-parallel-supercomputers/76138 "2022-06-29T03:35:40Z")

</div>

We (@santiagobadia, @amartinhuertas, and @fverdugo) are pleased to announce GridapDistributed.jl, a distributed-memory extension of Gridap.jl. It provides a massively parallel, generic toolbox written in Julia for the la…

---

## [How to calculate Cross Entropy loss between y\_predict and y\_target on GPU](https://discourse.julialang.org/t/how-to-calculate-cross-entropy-loss-between-y-predict-and-y-target-on-gpu/83429)

<div class="topic-metadata">

**Author:** [@Jack\_N](https://discourse.julialang.org/u/Jack_N)\
**Replies:** 4\
**Last updated:** [June 29, 2022, 3:08am UTC](https://discourse.julialang.org/t/how-to-calculate-cross-entropy-loss-between-y-predict-and-y-target-on-gpu/83429 "2022-06-29T03:08:12Z")

</div>

I have not been able to find out how to calculate the loss between each column of a y\_predict and y\_target matrix as a GPU operation. Please let me know how I can do this. Thank you, Jack

---

## [How to take full advantage of GPU Parallelism on Nested Sequential Data in Flux](https://discourse.julialang.org/t/how-to-take-full-advantage-of-gpu-parallelism-on-nested-sequential-data-in-flux/83128)

<div class="topic-metadata">

**Author:** [@Jack\_N](https://discourse.julialang.org/u/Jack_N)\
**Replies:** 6\
**Last updated:** [June 29, 2022, 12:32am UTC](https://discourse.julialang.org/t/how-to-take-full-advantage-of-gpu-parallelism-on-nested-sequential-data-in-flux/83128 "2022-06-29T00:32:20Z")

</div>

I am making a machine learning model in Flux that needs to analyze nested sequential data (sequences whose elements are each composed of smaller sequences). I have tried to implement the model on my Nvidia GPU but have r…

---

## [How to use fit\_mle for Gamma](https://discourse.julialang.org/t/how-to-use-fit-mle-for-gamma/83495)

<div class="topic-metadata">

**Author:** [@Jian\_ZUO](https://discourse.julialang.org/u/Jian_ZUO)\
**Replies:** 0\
**Last updated:** [June 28, 2022, 11:59pm UTC](https://discourse.julialang.org/t/how-to-use-fit-mle-for-gamma/83495 "2022-06-28T23:59:42Z")

</div>

Hi all, I have a series of deterioration data and the corresponding time for these measurements: # deterioration r = \[0.1803, 0.1978, 0.2033, 0.2092, 0.2157, 0.2254\] # time t = \[0, 185, 348, 515, 658, 830\] The increme…

---

## [How to add Padding/Zero Rows to OneHotArray in Flux](https://discourse.julialang.org/t/how-to-add-padding-zero-rows-to-onehotarray-in-flux/83239)

<div class="topic-metadata">

**Author:** [@Jack\_N](https://discourse.julialang.org/u/Jack_N)\
**Replies:** 1\
**Last updated:** [June 28, 2022, 10:42pm UTC](https://discourse.julialang.org/t/how-to-add-padding-zero-rows-to-onehotarray-in-flux/83239 "2022-06-28T22:42:23Z")

</div>

The input data to my model is 1-hot encoded, and of different lengths, and it is 3D. Therefore it must be represented with a sparse datatype and padded to the same length. Currently, I am using multidimensional Flux One…

---

## [3D Arrays : Selecting values of array B around some bit index based on array A](https://discourse.julialang.org/t/3d-arrays-selecting-values-of-array-b-around-some-bit-index-based-on-array-a/83400)

<div class="topic-metadata">

**Author:** [@meliorist](https://discourse.julialang.org/u/meliorist)\
**Replies:** 6\
**Last updated:** [June 28, 2022, 7:38pm UTC](https://discourse.julialang.org/t/3d-arrays-selecting-values-of-array-b-around-some-bit-index-based-on-array-a/83400 "2022-06-28T19:38:47Z")

</div>

I have a 3d array of some values of varA (time, lat, lon). I want to access some varB based on the values of varA. index = varA.\>threshold I know I can access these values in varB with the syntax selected\_B = varB\[ind…

---

## [Correct type in function for Dict of NTuple](https://discourse.julialang.org/t/correct-type-in-function-for-dict-of-ntuple/83474)

<div class="topic-metadata">

**Author:** [@christmas\_jones](https://discourse.julialang.org/u/christmas_jones)\
**Replies:** 2\
**Last updated:** [June 28, 2022, 6:12pm UTC](https://discourse.julialang.org/t/correct-type-in-function-for-dict-of-ntuple/83474 "2022-06-28T18:12:55Z")

</div>

I need a function which takes a Dictionary, where keys are Integer Tuples, and values are Float64 types. I do not know in advance the length of the Tuples, so I would be tempted to use the following type in the function…

---

## [Javis Animation Cosmic Dance with 3 planets](https://discourse.julialang.org/t/javis-animation-cosmic-dance-with-3-planets/83458)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 5\
**Last updated:** [June 28, 2022, 3:42pm UTC](https://discourse.julialang.org/t/javis-animation-cosmic-dance-with-3-planets/83458 "2022-06-28T15:42:19Z")

</div>

I am using Javis and try to modify the cosmic dance with 3 planets, I want to ask how to make the second connection that draw different color, I set it but it only painted the last color “#f9e8b3” here is my code: usin…

---

## [Best practice for packages on shared drives](https://discourse.julialang.org/t/best-practice-for-packages-on-shared-drives/83374)

<div class="topic-metadata">

**Author:** [@JackStrauss](https://discourse.julialang.org/u/JackStrauss)\
**Replies:** 12\
**Last updated:** [June 28, 2022, 3:12pm UTC](https://discourse.julialang.org/t/best-practice-for-packages-on-shared-drives/83374 "2022-06-28T15:12:10Z")

</div>

Hi We have julia running on both linux and mac, and on intel and M1, and the julia versions might not the same. We use synced folders which contains all the code for our in-house packages, the applications that use the …

---

## [Performance of methods to iterate through array](https://discourse.julialang.org/t/performance-of-methods-to-iterate-through-array/83465)

<div class="topic-metadata">

**Author:** [@virtualprocessor](https://discourse.julialang.org/u/virtualprocessor)\
**Replies:** 0\
**Last updated:** [June 28, 2022, 3:00pm UTC](https://discourse.julialang.org/t/performance-of-methods-to-iterate-through-array/83465 "2022-06-28T15:00:26Z")

</div>

I stumbled across this post on the Discourse with a very interesting performance benchmark that goes over a series of methods of iterating through an array: Methods (and results without inbounds): How much can hard-code…

---

## [Logo Animation with Javis and Fourier](https://discourse.julialang.org/t/logo-animation-with-javis-and-fourier/83461)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 0\
**Last updated:** [June 28, 2022, 2:15pm UTC](https://discourse.julialang.org/t/logo-animation-with-javis-and-fourier/83461 "2022-06-28T14:15:01Z")

</div>

I saw this on Javis tutorial: https://www.youtube.com/watch?v=rrmx2Q3sO1Y I want to know is anyone ever try to create with their own custom logo or text? I want to learn to create the custom one.

---

## [Weird: GitHub CI compute opposite directions in the output of my PCA on some commits on Julia v1.7.3](https://discourse.julialang.org/t/weird-github-ci-compute-opposite-directions-in-the-output-of-my-pca-on-some-commits-on-julia-v1-7-3/83454)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 5\
**Last updated:** [June 28, 2022, 1:35pm UTC](https://discourse.julialang.org/t/weird-github-ci-compute-opposite-directions-in-the-output-of-my-pca-on-some-commits-on-julia-v1-7-3/83454 "2022-06-28T13:35:43Z")

</div>

I have an eigenvalues-decomposition based PCA function in my lib, and I test it with: X = \[1 8; 4.5 5.5; 9.5 0.5\] out = pcatest(X;K=2) @test isapprox(out.X,\[-4.58465 6.63182;-0.308999 7.09961; 6.75092 6.70262\],atol…

---

## [Julia docker image for AWS Sagemaker Studio won't run](https://discourse.julialang.org/t/julia-docker-image-for-aws-sagemaker-studio-wont-run/83448)

<div class="topic-metadata">

**Author:** [@DataHacks](https://discourse.julialang.org/u/DataHacks)\
**Replies:** 0\
**Last updated:** [June 28, 2022, 7:48am UTC](https://discourse.julialang.org/t/julia-docker-image-for-aws-sagemaker-studio-wont-run/83448 "2022-06-28T07:48:36Z")

</div>

Hi all, I am trying to create a docker image for Julia that will run on AWS Sagemaker Studio, but it won’t even load an image terminal, run Julia command line, or the kernel in Studio. I have successfully created an ima…

---

## [Private subpackages](https://discourse.julialang.org/t/private-subpackages/83449)

<div class="topic-metadata">

**Author:** [@simsurace](https://discourse.julialang.org/u/simsurace)\
**Replies:** 1\
**Last updated:** [June 28, 2022, 11:31am UTC](https://discourse.julialang.org/t/private-subpackages/83449 "2022-06-28T11:31:59Z")

</div>

I have a private (unregistered, closed-source) package. Now I would like to split part of that package into a separate subpackage, i.e. a Julia package that lives in a sub-folder of my current main package, but has separ…

---

## [Multiplying Functions and Operators with Symbolics.jl](https://discourse.julialang.org/t/multiplying-functions-and-operators-with-symbolics-jl/83406)

<div class="topic-metadata">

**Author:** [@MattM](https://discourse.julialang.org/u/MattM)\
**Replies:** 0\
**Last updated:** [June 27, 2022, 2:42pm UTC](https://discourse.julialang.org/t/multiplying-functions-and-operators-with-symbolics-jl/83406 "2022-06-27T14:42:00Z")

</div>

Hello, I am still new to Julia and the Symbolics.jl package. I am trying to implement a poisson bracket operator :f: = \\frac{\\partial f}{\\partial q} \\frac{\\partial }{\\partial p} - \\frac{\\partial f}{\\partial p} \\frac{\\p…

---

## [Package registration, multiple authors](https://discourse.julialang.org/t/package-registration-multiple-authors/83220)

<div class="topic-metadata">

**Author:** [@sparrowhawk](https://discourse.julialang.org/u/sparrowhawk)\
**Replies:** 4\
**Last updated:** [June 28, 2022, 8:10am UTC](https://discourse.julialang.org/t/package-registration-multiple-authors/83220 "2022-06-28T08:10:13Z")

</div>

Hi, our group has registered a scientific package through JuliaHub , but unfortunately, the person who did most of the software engineering including the registration is leaving us. Can I continue to update release versi…

---

## [Parameter estimation fails for Modelingtoolkit model specification but works fine for DifferentialEquations.jl specification](https://discourse.julialang.org/t/parameter-estimation-fails-for-modelingtoolkit-model-specification-but-works-fine-for-differentialequations-jl-specification/83444)

<div class="topic-metadata">

**Author:** [@Curio\_math](https://discourse.julialang.org/u/Curio_math)\
**Replies:** 6\
**Last updated:** [June 28, 2022, 6:55am UTC](https://discourse.julialang.org/t/parameter-estimation-fails-for-modelingtoolkit-model-specification-but-works-fine-for-differentialequations-jl-specification/83444 "2022-06-28T06:55:29Z")

</div>

Hi, I have confronted with something amazing ! I was trying parameter estimation on Lotka-volterra example in DiffeqParamEstim which uses DifferentialEquations.jl model specification and parameter estimation using Least…

---

## [Error while installing and using GlobalEnergyGIS package - syntax error?](https://discourse.julialang.org/t/error-while-installing-and-using-globalenergygis-package-syntax-error/83349)

<div class="topic-metadata">

**Author:** [@moda](https://discourse.julialang.org/u/moda)\
**Replies:** 5\
**Last updated:** [June 28, 2022, 3:01am UTC](https://discourse.julialang.org/t/error-while-installing-and-using-globalenergygis-package-syntax-error/83349 "2022-06-28T03:01:40Z")

</div>

Error while installing and using GlobalEnergyGIS package - syntax error? As it is rather urgent, whoever helps to solve and download the data will get $50 through Venmo, thank you very much!!! :innocent: My ultimate go…

---

## [Is MolecularGraph.jl abandoned?](https://discourse.julialang.org/t/is-moleculargraph-jl-abandoned/82728)

<div class="topic-metadata">

**Author:** [@DoktorMike](https://discourse.julialang.org/u/DoktorMike)\
**Replies:** 4\
**Last updated:** [June 27, 2022, 11:39pm UTC](https://discourse.julialang.org/t/is-moleculargraph-jl-abandoned/82728 "2022-06-27T23:39:19Z")

</div>

The latest update of MolecularGraph.jl, as far as I can see, is 9 months ago. This is a booming field where this kind of package is crucial. I’ve seen that ChemistryFeaturization.jl seem to be rather active but seems mor…

---

## [Capturing PrettyTables output in Franknlin](https://discourse.julialang.org/t/capturing-prettytables-output-in-franknlin/83403)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 3\
**Last updated:** [June 27, 2022, 10:12pm UTC](https://discourse.julialang.org/t/capturing-prettytables-output-in-franknlin/83403 "2022-06-27T22:12:09Z")

</div>

Hi, Anyone knows how to capture the output of PrettyTables in a Franklin page? Of two examples below (second is from Franklin’s manual), the first shows the output via PrettyTables and it doesn’t show up in the genera…

---

## [Smoothing Data with Dates](https://discourse.julialang.org/t/smoothing-data-with-dates/83416)

<div class="topic-metadata">

**Author:** [@Jake](https://discourse.julialang.org/u/Jake)\
**Replies:** 2\
**Last updated:** [June 27, 2022, 10:08pm UTC](https://discourse.julialang.org/t/smoothing-data-with-dates/83416 "2022-06-27T22:08:49Z")

</div>

I have some data with an abscissa of DateTime type that I would like to smooth. I am familiar with SmoothingSplines so created my minimum non-working example with it. I need to figure out how to put the DateTime into a…

---

## [3d animation plot of 2 ode solutions](https://discourse.julialang.org/t/3d-animation-plot-of-2-ode-solutions/83408)

<div class="topic-metadata">

**Author:** [@jpro](https://discourse.julialang.org/u/jpro)\
**Replies:** 4\
**Last updated:** [June 27, 2022, 9:40pm UTC](https://discourse.julialang.org/t/3d-animation-plot-of-2-ode-solutions/83408 "2022-06-27T21:40:07Z")

</div>

Hi, I’m very new to Julia and the plots package. I’d like to plot 2 ode solutions within the same gif. For example, say I’m solving the lorenz function and want to plot two solutions with different parameters in the same…

---

## [Exclude packages from PackageCompiler create\_app precompilation](https://discourse.julialang.org/t/exclude-packages-from-packagecompiler-create-app-precompilation/76134)

<div class="topic-metadata">

**Author:** [@bclyons12](https://discourse.julialang.org/u/bclyons12)\
**Replies:** 4\
**Last updated:** [June 27, 2022, 9:15pm UTC](https://discourse.julialang.org/t/exclude-packages-from-packagecompiler-create-app-precompilation/76134 "2022-06-27T21:15:17Z")

</div>

Is there a way to avoid PackageCompiler.jl’s create\_app compiling specific packages within a Project.toml? I have a package I’m working on that includes Plots in the Project.toml for debugging and testing. Any calls to …

---

## [Cannot install CUDA.jl on WIndows](https://discourse.julialang.org/t/cannot-install-cuda-jl-on-windows/83372)

<div class="topic-metadata">

**Author:** [@sairus7](https://discourse.julialang.org/u/sairus7)\
**Replies:** 4\
**Last updated:** [June 27, 2022, 5:37pm UTC](https://discourse.julialang.org/t/cannot-install-cuda-jl-on-windows/83372 "2022-06-27T17:37:15Z")

</div>

Cannot install CUDA.jl on WIndows. Is there a workaround for this? Should I try it with WSL or manualy download and install CUDA toolkit? julia\> using CUDA julia\> CUDA.versioninfo() Downloaded artifact: CUDA ┌ Warnin…

---

## [Renting a multi-GPU cloud computing cluster](https://discourse.julialang.org/t/renting-a-multi-gpu-cloud-computing-cluster/25920)

<div class="topic-metadata">

**Author:** [@francesco.alemanno](https://discourse.julialang.org/u/francesco.alemanno)\
**Replies:** 2\
**Last updated:** [June 27, 2022, 5:08pm UTC](https://discourse.julialang.org/t/renting-a-multi-gpu-cloud-computing-cluster/25920 "2022-06-27T17:08:35Z")

</div>

Hey everyone! i need to use julia for massively parallel GPU computing, what are the best/cheapest options available? i heard about Amazon AWS, Microsoft Azure, Google Cloud Computing but for this kind of HPC, i’m c…

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

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