# General Usage

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

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

**Page:** 556

---

## [How to sum outputs from DifferentialEquations.jl](https://discourse.julialang.org/t/how-to-sum-outputs-from-differentialequations-jl/67034)

<div class="topic-metadata">

**Author:** [@mgp](https://discourse.julialang.org/u/mgp)\
**Replies:** 7\
**Last updated:** [August 26, 2021, 5:31pm UTC](https://discourse.julialang.org/t/how-to-sum-outputs-from-differentialequations-jl/67034 "2021-08-26T17:31:00Z")

</div>

I am making a series of compartmental ODE infection models using DifferentialEquations. I would like to be able to plot the sum of two or more compartments (e.g. I might have people with undiagnosed infection and diagnos…

---

## [Delay Differential Equation problem](https://discourse.julialang.org/t/delay-differential-equation-problem/67044)

<div class="topic-metadata">

**Author:** [@Liwei17](https://discourse.julialang.org/u/Liwei17)\
**Replies:** 5\
**Last updated:** [August 26, 2021, 5:17pm UTC](https://discourse.julialang.org/t/delay-differential-equation-problem/67044 "2021-08-26T17:17:29Z")

</div>

DifferentialEquation.jl DDE running problem: using DifferentialEquations, Plots function dde(du,u,h,p,t) M\_A, M\_B = u; tau, mu, n, P0, b = p; hist\_A = h(p, t-tau)\[1\]; hist\_B = h(p, t-tau)\[2\]; du\[1\] …

---

## [Merging two dictionaries with only keys in “b” that also exist in “a”](https://discourse.julialang.org/t/merging-two-dictionaries-with-only-keys-in-b-that-also-exist-in-a/66985)

<div class="topic-metadata">

**Author:** [@Jan\_Dolinsky](https://discourse.julialang.org/u/Jan_Dolinsky)\
**Replies:** 5\
**Last updated:** [August 26, 2021, 4:50pm UTC](https://discourse.julialang.org/t/merging-two-dictionaries-with-only-keys-in-b-that-also-exist-in-a/66985 "2021-08-26T16:50:01Z")

</div>

Hello, I would like to merge two dictionaries where I want to merge only keys in “b” that also exists in “a”. Is there a neat way of doing this? Example: a = Dict("foo" =\> 23, "bar" =\> 24) b = Dict("bar" =\> 450, "unwa…

---

## [Problem in opening dataframe](https://discourse.julialang.org/t/problem-in-opening-dataframe/67043)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 4\
**Last updated:** [August 26, 2021, 3:59pm UTC](https://discourse.julialang.org/t/problem-in-opening-dataframe/67043 "2021-08-26T15:59:54Z")

</div>

Hello, I have been trying to open a tab delimited file as dataframe. My command was: using DataFrames using CSV df = CSV.read(\<file\>, delim='\\t', missingstring="NA", decimal='.', header = false; copycols=true) Now I a…

---

## [Performance drawback with subtyping](https://discourse.julialang.org/t/performance-drawback-with-subtyping/51939)

<div class="topic-metadata">

**Author:** [@Ronneesley](https://discourse.julialang.org/u/Ronneesley)\
**Replies:** 34\
**Last updated:** [August 26, 2021, 2:37pm UTC](https://discourse.julialang.org/t/performance-drawback-with-subtyping/51939 "2021-08-26T14:37:16Z")

</div>

Hello, I’ve a problem with subtype, see the code: abstract type LineAbstract end mutable struct LineA \<: LineAbstract color::String end mutable struct LineB \<: LineAbstract length::Int end mutable struct…

---

## [Passing Function As Object VS Creating New Function](https://discourse.julialang.org/t/passing-function-as-object-vs-creating-new-function/66933)

<div class="topic-metadata">

**Author:** [@cmdenis](https://discourse.julialang.org/u/cmdenis)\
**Replies:** 5\
**Last updated:** [August 26, 2021, 1:56pm UTC](https://discourse.julialang.org/t/passing-function-as-object-vs-creating-new-function/66933 "2021-08-26T13:56:48Z")

</div>

Hello! So, I’ve stumbled upon a performance difference between two situations, and I don’t understand the reason behind this difference. The difference in computation time occurs between 1) passing a function to a varia…

---

## [Load testing of REST APIs](https://discourse.julialang.org/t/load-testing-of-rest-apis/66906)

<div class="topic-metadata">

**Author:** [@Jan\_Dolinsky](https://discourse.julialang.org/u/Jan_Dolinsky)\
**Replies:** 3\
**Last updated:** [August 26, 2021, 1:39pm UTC](https://discourse.julialang.org/t/load-testing-of-rest-apis/66906 "2021-08-26T13:39:37Z")

</div>

Hello, I would like to ask whether there is some package / effort providing load testing functionalities for REST APIs. We currently consider using jMeter but I wanted to check whether there is something I might not be …

---

## [Why isn't a simple map type stable?](https://discourse.julialang.org/t/why-isnt-a-simple-map-type-stable/67028)

<div class="topic-metadata">

**Author:** [@robsmith11](https://discourse.julialang.org/u/robsmith11)\
**Replies:** 2\
**Last updated:** [August 26, 2021, 12:11pm UTC](https://discourse.julialang.org/t/why-isnt-a-simple-map-type-stable/67028 "2021-08-26T12:11:33Z")

</div>

Shouldn’t Julia be able to infer that the return type is Vector{Float64} in the example below? prevx is initialized to a Float64 value and randn() returns a Float64 value. julia\> function gen1(n) prevx = 0.0 …

---

## [Can Julia access Memory locations or Registers directly](https://discourse.julialang.org/t/can-julia-access-memory-locations-or-registers-directly/67016)

<div class="topic-metadata">

**Author:** [@R.T.A.M](https://discourse.julialang.org/u/R.T.A.M)\
**Replies:** 12\
**Last updated:** [August 26, 2021, 12:32pm UTC](https://discourse.julialang.org/t/can-julia-access-memory-locations-or-registers-directly/67016 "2021-08-26T12:32:59Z")

</div>

Hi all, I’m after some advice on low level memory access. What is the best way to access (read or write) to individual registers in an embedded application with Julia? Say I want to read address 0x6000 0000 plus an off…

---

## [DifferentialEquations.jl and Measurements.jl](https://discourse.julialang.org/t/differentialequations-jl-and-measurements-jl/6350)

<div class="topic-metadata">

**Author:** [@giordano](https://discourse.julialang.org/u/giordano)\
**Replies:** 11\
**Last updated:** [August 26, 2021, 10:54am UTC](https://discourse.julialang.org/t/differentialequations-jl-and-measurements-jl/6350 "2021-08-26T10:54:24Z")

</div>

Today I was asked whether it was possible to solve in Julia differential equations involving numbers with uncertainties. Of course the answer is yes. What I find really amazing about Julia is that the two packages don’…

---

## [Reading metadata from files](https://discourse.julialang.org/t/reading-metadata-from-files/67027)

<div class="topic-metadata">

**Author:** [@reinermartin](https://discourse.julialang.org/u/reinermartin)\
**Replies:** 0\
**Last updated:** [August 26, 2021, 10:13am UTC](https://discourse.julialang.org/t/reading-metadata-from-files/67027 "2021-08-26T10:13:25Z")

</div>

Are there Julia libraries for reading metadata from music and image files (as for example tinytag for Python)?

---

## [Joining two ODE solutions](https://discourse.julialang.org/t/joining-two-ode-solutions/63710)

<div class="topic-metadata">

**Author:** [@Free\_ion](https://discourse.julialang.org/u/Free_ion)\
**Replies:** 5\
**Last updated:** [August 26, 2021, 4:31am UTC](https://discourse.julialang.org/t/joining-two-ode-solutions/63710 "2021-08-26T04:31:07Z")

</div>

Is there any way to join two ODE solutions so that I can use the final product as a function like an usual ODE solution? My problem is that I have a function α(ϕ) defined in two regimes, so I have to solve two ODEs. The…

---

## [PyCall and @guvectorize](https://discourse.julialang.org/t/pycall-and-guvectorize/67008)

<div class="topic-metadata">

**Author:** [@danicaratelli](https://discourse.julialang.org/u/danicaratelli)\
**Replies:** 0\
**Last updated:** [August 25, 2021, 11:49pm UTC](https://discourse.julialang.org/t/pycall-and-guvectorize/67008 "2021-08-25T23:49:39Z")

</div>

Hello, I have code in python that I am trying to import in Julia. I do the following: np = pyimport("numpy"); pyimport("numba").guvectorize; and in a separate file have py""" @guvectorize(\['void(float64\[:\], float64\[:…

---

## [Where or How to edit DEPOT\_PATH](https://discourse.julialang.org/t/where-or-how-to-edit-depot-path/13501)

<div class="topic-metadata">

**Author:** [@Moses](https://discourse.julialang.org/u/Moses)\
**Replies:** 16\
**Last updated:** [August 25, 2021, 11:38pm UTC](https://discourse.julialang.org/t/where-or-how-to-edit-depot-path/13501 "2021-08-25T23:38:00Z")

</div>

Dear community. I am obviously too stupid to find it or use it correctly. I want to change the folder julia uses to store the packages. I am working in an Active Directory environment and populating the user profile fo…

---

## [Reduce number of allocations](https://discourse.julialang.org/t/reduce-number-of-allocations/66990)

<div class="topic-metadata">

**Author:** [@daviddoij](https://discourse.julialang.org/u/daviddoij)\
**Replies:** 11\
**Last updated:** [August 25, 2021, 10:03pm UTC](https://discourse.julialang.org/t/reduce-number-of-allocations/66990 "2021-08-25T22:03:26Z")

</div>

I would like to reduce the number of allocations in this particular problem (for context, that’s problem 30 of project euler). I got it right, but I think there are too many allocations. function power\_digit\_sum(pow, n)…

---

## [Reading complex text files with vectors](https://discourse.julialang.org/t/reading-complex-text-files-with-vectors/66954)

<div class="topic-metadata">

**Author:** [@scone](https://discourse.julialang.org/u/scone)\
**Replies:** 6\
**Last updated:** [August 25, 2021, 10:03pm UTC](https://discourse.julialang.org/t/reading-complex-text-files-with-vectors/66954 "2021-08-25T22:03:01Z")

</div>

Hi, I am going to apologize ahead of time for this sort of general question, which is sort of similar others that have been asked. I am trying to read files the below, which are velocity vectors, probed at the location…

---

## [Solving difference equation](https://discourse.julialang.org/t/solving-difference-equation/66977)

<div class="topic-metadata">

**Author:** [@MathGuy](https://discourse.julialang.org/u/MathGuy)\
**Replies:** 8\
**Last updated:** [August 25, 2021, 7:58pm UTC](https://discourse.julialang.org/t/solving-difference-equation/66977 "2021-08-25T19:58:26Z")

</div>

This is my code to solve a system of difference equations: function trajectoryDiscrete(sys\_eq, init\_cond, NIter, par1, par2) neq = length(init\_cond) traj= zeros(Float64,NIter+1,neq) traj\[1,:\] = init\_cond …

---

## [JuliaDB, tutorial with large datasets and other questions](https://discourse.julialang.org/t/juliadb-tutorial-with-large-datasets-and-other-questions/33594)

<div class="topic-metadata">

**Author:** [@rna1990](https://discourse.julialang.org/u/rna1990)\
**Replies:** 0\
**Last updated:** [January 20, 2020, 4:49pm UTC](https://discourse.julialang.org/t/juliadb-tutorial-with-large-datasets-and-other-questions/33594 "2020-01-20T16:49:50Z")

</div>

Dear fellow julians, I’ve been learning the usage of JuliaDB to wrangle with large datasets (couple of millions of entries) and I don’t think I’m quite understanding the difference between in-memory and out-of-memory pr…

---

## [Is there a simple way of making a sequence of 3d array of UInt8 into a video?](https://discourse.julialang.org/t/is-there-a-simple-way-of-making-a-sequence-of-3d-array-of-uint8-into-a-video/66992)

<div class="topic-metadata">

**Author:** [@Abhinav\_Bhatia](https://discourse.julialang.org/u/Abhinav_Bhatia)\
**Replies:** 1\
**Last updated:** [August 25, 2021, 6:01pm UTC](https://discourse.julialang.org/t/is-there-a-simple-way-of-making-a-sequence-of-3d-array-of-uint8-into-a-video/66992 "2021-08-25T18:01:27Z")

</div>

Is there a simple way to save a sequence of Array{UInt8, 3} as a video? Can’t find any documentation on this. Writing Videos · VideoIO.jl (juliaio.github.io) I want to do something like: import VideoIO imgstack = map(x…

---

## [How to make EvoTrees.jl more performant?](https://discourse.julialang.org/t/how-to-make-evotrees-jl-more-performant/66407)

<div class="topic-metadata">

**Author:** [@YummyPampers2](https://discourse.julialang.org/u/YummyPampers2)\
**Replies:** 25\
**Last updated:** [August 25, 2021, 3:53pm UTC](https://discourse.julialang.org/t/how-to-make-evotrees-jl-more-performant/66407 "2021-08-25T15:53:35Z")

</div>

Hello Folks: Code Snippets obtained from Alan Turing Institute @ablaom Using Pluto.jl, Windows, Julia v 1.6.x I am using EvoTrees.jl Evaluation First I am loading and Instantiating the Gradient Tree Boosting Model B…

---

## [Writing a python command line app with a julia package underneath](https://discourse.julialang.org/t/writing-a-python-command-line-app-with-a-julia-package-underneath/66984)

<div class="topic-metadata">

**Author:** [@00krishna](https://discourse.julialang.org/u/00krishna)\
**Replies:** 5\
**Last updated:** [August 25, 2021, 3:54pm UTC](https://discourse.julialang.org/t/writing-a-python-command-line-app-with-a-julia-package-underneath/66984 "2021-08-25T15:54:54Z")

</div>

This might be a good question for @tim.holy . So I had written a package in python to process some geospatial images–raster files. The package had a nice CLI and everything. The problem was, the python geospatial librari…

---

## [PaddedViews very slow](https://discourse.julialang.org/t/paddedviews-very-slow/66979)

<div class="topic-metadata">

**Author:** [@weymouth](https://discourse.julialang.org/u/weymouth)\
**Replies:** 7\
**Last updated:** [August 25, 2021, 3:07pm UTC](https://discourse.julialang.org/t/paddedviews-very-slow/66979 "2021-08-25T15:07:05Z")

</div>

I’m sure to be doing something silly, but I can’t seem to get PaddedViews.jl up to speed. Consider the LoopVectorization.jl image filtering example using LoopVectorization, OffsetArrays, Images, PaddedViews kern = Image…

---

## [Differences in A \\ b for sparse and nonsparse rank-deficient A](https://discourse.julialang.org/t/differences-in-a-b-for-sparse-and-nonsparse-rank-deficient-a/66917)

<div class="topic-metadata">

**Author:** [@Thomas](https://discourse.julialang.org/u/Thomas)\
**Replies:** 4\
**Last updated:** [August 25, 2021, 12:28pm UTC](https://discourse.julialang.org/t/differences-in-a-b-for-sparse-and-nonsparse-rank-deficient-a/66917 "2021-08-25T12:28:05Z")

</div>

I have a question regarding the operator \\ for SpareseMatrixCSC. Thanks for your help. using LinearAlgebra, SparseArrays Is = \[9, 8, 9, 12, 2, 5, 6, 11, 8, 12\] Js = \[1, 3, 4, 4, 5, 5, 7, 7, 10, 10\] Vs = \[0.046668312772…

---

## [How to print some elements of array in one line in a file?](https://discourse.julialang.org/t/how-to-print-some-elements-of-array-in-one-line-in-a-file/66895)

<div class="topic-metadata">

**Author:** [@CRquantum](https://discourse.julialang.org/u/CRquantum)\
**Replies:** 17\
**Last updated:** [August 25, 2021, 8:29am UTC](https://discourse.julialang.org/t/how-to-print-some-elements-of-array-in-one-line-in-a-file/66895 "2021-08-25T08:29:53Z")

</div>

I have a small question which is a little similar with not the same as and Here is the thing, I can manually input 1.0, 2.0, 3.0, 4.0, and print them in one line and in a file called fileout.txt, here is the code, s…

---

## [Visualizing Matrix Transformations in Julia](https://discourse.julialang.org/t/visualizing-matrix-transformations-in-julia/66957)

<div class="topic-metadata">

**Author:** [@aburousan](https://discourse.julialang.org/u/aburousan)\
**Replies:** 5\
**Last updated:** [August 25, 2021, 7:45am UTC](https://discourse.julialang.org/t/visualizing-matrix-transformations-in-julia/66957 "2021-08-25T07:45:24Z")

</div>

I am new to julia. I have used manim in python. There we can visualize matrix transformation using a 2d grid and it’s transformation. Can we do the same in Julia?, Can someone help a bit?

---

## [A demo is 1.5x faster in Flux than tensorflow, both use cpu; while 3.0x slower during using CUDA](https://discourse.julialang.org/t/a-demo-is-1-5x-faster-in-flux-than-tensorflow-both-use-cpu-while-3-0x-slower-during-using-cuda/66703)

<div class="topic-metadata">

**Author:** [@HANHAOHAN](https://discourse.julialang.org/u/HANHAOHAN)\
**Replies:** 5\
**Last updated:** [August 25, 2021, 2:30am UTC](https://discourse.julialang.org/t/a-demo-is-1-5x-faster-in-flux-than-tensorflow-both-use-cpu-while-3-0x-slower-during-using-cuda/66703 "2021-08-25T02:30:41Z")

</div>

using Flux using CUDA data = randn(Float32, 2, 100000) |\> gpu y = reshape(sin.(data\[1,:\] .\* data\[2,:\]), (1, size(data)\[2\])) |\> gpu model = Chain( Dense(2, 10, relu), Dense(10, 10, relu), Dense(10, 10, relu), Dense(10, 10…

---

## [PlotlyJS: how to make a responsive chart?](https://discourse.julialang.org/t/plotlyjs-how-to-make-a-responsive-chart/66942)

<div class="topic-metadata">

**Author:** [@VivMendes](https://discourse.julialang.org/u/VivMendes)\
**Replies:** 4\
**Last updated:** [August 24, 2021, 10:42pm UTC](https://discourse.julialang.org/t/plotlyjs-how-to-make-a-responsive-chart/66942 "2021-08-24T22:42:19Z")

</div>

Hi, I am trying to make a plot produced by PlotlyBase (in Pluto), or by PlotlyJS in VSCode, responsive to the size of the chart when is exported as an HTML file or when its size is changed in the Electron window. In the…

---

## [Is there an IDE that can statically determine undefined variables in function, and auto-complete structs?](https://discourse.julialang.org/t/is-there-an-ide-that-can-statically-determine-undefined-variables-in-function-and-auto-complete-structs/66941)

<div class="topic-metadata">

**Author:** [@DiracFermion1](https://discourse.julialang.org/u/DiracFermion1)\
**Replies:** 9\
**Last updated:** [August 24, 2021, 9:36pm UTC](https://discourse.julialang.org/t/is-there-an-ide-that-can-statically-determine-undefined-variables-in-function-and-auto-complete-structs/66941 "2021-08-24T21:36:07Z")

</div>

For example, suppose I have following code: struct Param # used to hold global variables n\_days::Int n\_segments::Int end function f(a, b, c) d + 1 end I wonder if there is an IDE that can do following: …

---

## [Minimal working example that demonstrates the danger of type piracy](https://discourse.julialang.org/t/minimal-working-example-that-demonstrates-the-danger-of-type-piracy/66922)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 9\
**Last updated:** [August 24, 2021, 7:08pm UTC](https://discourse.julialang.org/t/minimal-working-example-that-demonstrates-the-danger-of-type-piracy/66922 "2021-08-24T19:08:32Z")

</div>

I understand what type piracy is, but I’m still hazy on exactly what sort of problems it can cause. Can someone provide a minimal working example that demonstrates the unexpected behavior that can result from type piracy…

---

## [Why is collect(1:3) === \[1, 2, 3\] false?](https://discourse.julialang.org/t/why-is-collect-1-3-1-2-3-false/66915)

<div class="topic-metadata">

**Author:** [@LeePhillips](https://discourse.julialang.org/u/LeePhillips)\
**Replies:** 11\
**Last updated:** [August 24, 2021, 5:55pm UTC](https://discourse.julialang.org/t/why-is-collect-1-3-1-2-3-false/66915 "2021-08-24T17:55:48Z")

</div>

Both sides of the comparison have the same values and the same type. I must not understand === correctly.

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

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