# General Usage

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

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

**Page:** 646

---

## [What is difference between Debugger.jl in REPL and in VS Code GUI one?](https://discourse.julialang.org/t/what-is-difference-between-debugger-jl-in-repl-and-in-vs-code-gui-one/54969)

<div class="topic-metadata">

**Author:** [@Oto\_Brzobohaty](https://discourse.julialang.org/u/Oto_Brzobohaty)\
**Replies:** 0\
**Last updated:** [February 10, 2021, 8:23am UTC](https://discourse.julialang.org/t/what-is-difference-between-debugger-jl-in-repl-and-in-vs-code-gui-one/54969 "2021-02-10T08:23:11Z")

</div>

My impression is that using Debugger.jl is much faster than debugging in VS Code Usage: import Debugger Debugger.@enter function\_name(parameters) vs @enter function\_name(parameters) directly in VS Code My impre…

---

## [Issue with using SpecialFunctions.jl](https://discourse.julialang.org/t/issue-with-using-specialfunctions-jl/54906)

<div class="topic-metadata">

**Author:** [@mdsa3d](https://discourse.julialang.org/u/mdsa3d)\
**Replies:** 9\
**Last updated:** [February 10, 2021, 7:08am UTC](https://discourse.julialang.org/t/issue-with-using-specialfunctions-jl/54906 "2021-02-10T07:08:26Z")

</div>

I am trying to use exponential integral function from SpecialFunctions.jl. using SpecialFunctions expinti(x) When I execute this code the expinti() throws an error: UndefVarError: expinti not defined This function ex…

---

## [Type declaration in function arguments: Allow adjoints and column vectors?](https://discourse.julialang.org/t/type-declaration-in-function-arguments-allow-adjoints-and-column-vectors/54960)

<div class="topic-metadata">

**Author:** [@maxkapur](https://discourse.julialang.org/u/maxkapur)\
**Replies:** 6\
**Last updated:** [February 10, 2021, 6:44am UTC](https://discourse.julialang.org/t/type-declaration-in-function-arguments-allow-adjoints-and-column-vectors/54960 "2021-02-10T06:44:40Z")

</div>

I have a function that nominally accepts only 2-dimension arrays as input: julia\> function foo(x::Array{Float64, 2}) # Stuff return nothing end foo (generic function with 1 method) julia\> y…

---

## [Why is hashing Dicts faster than Arrays?](https://discourse.julialang.org/t/why-is-hashing-dicts-faster-than-arrays/54963)

<div class="topic-metadata">

**Author:** [@bsuwal](https://discourse.julialang.org/u/bsuwal)\
**Replies:** 1\
**Last updated:** [February 10, 2021, 3:15am UTC](https://discourse.julialang.org/t/why-is-hashing-dicts-faster-than-arrays/54963 "2021-02-10T03:15:17Z")

</div>

I am suprised as to why hashing dicts is faster than arrays: d = Dict{Int, Int}(\[i =\> i for i in 1:10\]) n = 10000000 @btime begin for i = 1:n hash(d) end end gave me 1.457 s (39998979 allocations: 762.9…

---

## [Error in installing flux?](https://discourse.julialang.org/t/error-in-installing-flux/54887)

<div class="topic-metadata">

**Author:** [@Ravinder\_Ram](https://discourse.julialang.org/u/Ravinder_Ram)\
**Replies:** 2\
**Last updated:** [February 10, 2021, 3:11am UTC](https://discourse.julialang.org/t/error-in-installing-flux/54887 "2021-02-10T03:11:52Z")

</div>

I have installed v1.0.5

---

## [Effective Text Extraction from Documents (PDFs)](https://discourse.julialang.org/t/effective-text-extraction-from-documents-pdfs/54889)

<div class="topic-metadata">

**Author:** [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Replies:** 2\
**Last updated:** [February 9, 2021, 10:48pm UTC](https://discourse.julialang.org/t/effective-text-extraction-from-documents-pdfs/54889 "2021-02-09T22:48:29Z")

</div>

Hi all, Question for those involved with text extraction pipelines (or ETL pipelines for that matter): In Julia, what works best for you when doing text extraction from PDFs? In my case, I am simplifying the problem t…

---

## [Running Julia scripts from excel VBA](https://discourse.julialang.org/t/running-julia-scripts-from-excel-vba/54022)

<div class="topic-metadata">

**Author:** [@Peter-Jolly](https://discourse.julialang.org/u/Peter-Jolly)\
**Replies:** 5\
**Last updated:** [February 9, 2021, 10:24pm UTC](https://discourse.julialang.org/t/running-julia-scripts-from-excel-vba/54022 "2021-02-09T22:24:59Z")

</div>

Hi I am trying to run Julia scripts called from excel VBA under a Windows operating environment. I copied a program from the web, that supposedly works for Python scripts, and made the changes (see below). When I run t…

---

## [Why is that\`\`\`d = Dict("a"=&gt;1, "b"=&gt;2, "c"=&gt;3)filter!(d) do (k, v)](https://discourse.julialang.org/t/why-is-that-d-dict-a-gt-1-b-gt-2-c-gt-3-filter-d-do-k-v/54955)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [February 9, 2021, 9:25pm UTC](https://discourse.julialang.org/t/why-is-that-d-dict-a-gt-1-b-gt-2-c-gt-3-filter-d-do-k-v/54955 "2021-02-09T21:25:14Z")

</div>

Why is that d = Dict("a"=&gt;1, "b"=&gt;2, "c"=&gt;3) filter!(d) do (k, v) iseven(v) end is happy, but d = Dict("a"=&gt;1, "b"=&gt;2, "c"=&gt;3) filter!((k,v) -&gt; iseven(v), d) is sad and throws ERROR: MethodEr…

---

## [Quick simple example of the problem I'm running into. Is there something I'm missi](https://discourse.julialang.org/t/quick-simple-example-of-the-problem-im-running-into-is-there-something-im-missi/54945)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [February 9, 2021, 7:33pm UTC](https://discourse.julialang.org/t/quick-simple-example-of-the-problem-im-running-into-is-there-something-im-missi/54945 "2021-02-09T19:33:17Z")

</div>

Quick simple example of the problem I’m running into. Is there something I’m missing on how to do this? I have more than 2 conditions for my thing and I want a bit array returned based on different arrays. julia&gt; \[1.…

---

## [Plotting implicit functions](https://discourse.julialang.org/t/plotting-implicit-functions/54874)

<div class="topic-metadata">

**Author:** [@em55](https://discourse.julialang.org/u/em55)\
**Replies:** 5\
**Last updated:** [February 9, 2021, 9:39am UTC](https://discourse.julialang.org/t/plotting-implicit-functions/54874 "2021-02-09T09:39:03Z")

</div>

Hello! I have an implicit equation that fixes y as a function of x. I plotted y over a range of x using the package ImplicitEquations.jl . I would now like to plot a third variable w over the same x range and using the …

---

## [I have a use-case where I have lists of predefined "special" points: usually, thes](https://discourse.julialang.org/t/i-have-a-use-case-where-i-have-lists-of-predefined-special-points-usually-thes/54949)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [February 9, 2021, 7:04pm UTC](https://discourse.julialang.org/t/i-have-a-use-case-where-i-have-lists-of-predefined-special-points-usually-thes/54949 "2021-02-09T19:04:51Z")

</div>

I have a use-case where I have lists of predefined “special” points: usually, these points are ordinary vectors of floats, but occasionally, they depend on some external variables via some simple algebraic expression, e.…

---

## [Anyone know how to re-precompile a package in julia 1.6.0 rc?](https://discourse.julialang.org/t/anyone-know-how-to-re-precompile-a-package-in-julia-1-6-0-rc/54943)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [February 9, 2021, 5:17pm UTC](https://discourse.julialang.org/t/anyone-know-how-to-re-precompile-a-package-in-julia-1-6-0-rc/54943 "2021-02-09T17:17:33Z")

</div>

Anyone know how to re-precompile a package in julia 1.6.0 rc? Note that the original poster on Slack cannot see your response here on Discourse. Consider transcribing the appropriate answer back to Slack, or pinging the…

---

## [PyObject Decimal to Julia FixedPointDecimal](https://discourse.julialang.org/t/pyobject-decimal-to-julia-fixedpointdecimal/54939)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 1\
**Last updated:** [February 9, 2021, 4:00pm UTC](https://discourse.julialang.org/t/pyobject-decimal-to-julia-fixedpointdecimal/54939 "2021-02-09T16:00:18Z")

</div>

Hi all, I’m getting some date via PyCall. Unfortunately I get a PyObject. Does anyone know how to convert it to FixedPointDecimal? Thanks

---

## [I want to embed a Julia module inside a C program. The documentation is not very c](https://discourse.julialang.org/t/i-want-to-embed-a-julia-module-inside-a-c-program-the-documentation-is-not-very-c/54928)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 3\
**Last updated:** [February 9, 2021, 2:25pm UTC](https://discourse.julialang.org/t/i-want-to-embed-a-julia-module-inside-a-c-program-the-documentation-is-not-very-c/54928 "2021-02-09T14:25:53Z")

</div>

I want to embed a Julia module inside a C program. The documentation is not very clear. Does someone know how to import a module? The example uses jl\_function\_t \*func = jl\_get\_function(jl\_base\_module, "sqrt"); and I woul…

---

## [Why does this not work?](https://discourse.julialang.org/t/why-does-this-not-work/54923)

<div class="topic-metadata">

**Author:** [@Jean\_Michel](https://discourse.julialang.org/u/Jean_Michel)\
**Replies:** 4\
**Last updated:** [February 9, 2021, 1:19pm UTC](https://discourse.julialang.org/t/why-does-this-not-work/54923 "2021-02-09T13:19:47Z")

</div>

I wanted to find the first line of a matrix which is all -1 s. I am surprised the following does not work. What is going on here? julia\> findfirst(l-\>all(y-\>y==-1,l),eachrow(\[1 1;-1 -1\])) ERROR: MethodError: no method …

---

## [Using Cosine Similarity for KMeans clustering](https://discourse.julialang.org/t/using-cosine-similarity-for-kmeans-clustering/54898)

<div class="topic-metadata">

**Author:** [@BobPen](https://discourse.julialang.org/u/BobPen)\
**Replies:** 2\
**Last updated:** [February 9, 2021, 12:04pm UTC](https://discourse.julialang.org/t/using-cosine-similarity-for-kmeans-clustering/54898 "2021-02-09T12:04:39Z")

</div>

I am making with an implementation of K-means clustering in Julia. Figure out, and implement a modification of k-means that alternatively measure similarity by the angle between vectors. So I assumed that one could use…

---

## [Load multiples NCDataset](https://discourse.julialang.org/t/load-multiples-ncdataset/54717)

<div class="topic-metadata">

**Author:** [@wulan87](https://discourse.julialang.org/u/wulan87)\
**Replies:** 2\
**Last updated:** [February 9, 2021, 9:28am UTC](https://discourse.julialang.org/t/load-multiples-ncdataset/54717 "2021-02-09T09:28:25Z")

</div>

Hello here I am working with multiple netcdf MODIS datas using NCDataset.jl. I don’t know how “fnames” mean by vector files, below is the example to load datas from documentation. mfds = NCDataset(fnames,mode = “r”; ag…

---

## [What can happen if I use IdDict to protect an immutable variable from GC deallocation?](https://discourse.julialang.org/t/what-can-happen-if-i-use-iddict-to-protect-an-immutable-variable-from-gc-deallocation/54676)

<div class="topic-metadata">

**Author:** [@fanxp](https://discourse.julialang.org/u/fanxp)\
**Replies:** 2\
**Last updated:** [February 9, 2021, 9:25am UTC](https://discourse.julialang.org/t/what-can-happen-if-i-use-iddict-to-protect-an-immutable-variable-from-gc-deallocation/54676 "2021-02-09T09:25:59Z")

</div>

Hi, I am following this link to use IdDict to protect some scalar (immutable, i.e. a=2.0) variables. https://docs.julialang.org/en/v1/manual/embedding/#Memory-Management Quote: One simple way to accomplish this is t…

---

## [How to access the value of a RefValue{Any} Julia variable in C?](https://discourse.julialang.org/t/how-to-access-the-value-of-a-refvalue-any-julia-variable-in-c/54606)

<div class="topic-metadata">

**Author:** [@fanxp](https://discourse.julialang.org/u/fanxp)\
**Replies:** 2\
**Last updated:** [February 9, 2021, 9:00am UTC](https://discourse.julialang.org/t/how-to-access-the-value-of-a-refvalue-any-julia-variable-in-c/54606 "2021-02-09T09:00:26Z")

</div>

Hi, I use RefValue{Any} to protect a scalar (immutable type) inside the IdDict, according to Embedding Julia · The Julia Language. But I don’t know how to use the RefValue{Any} variable ('b" in the following example) i…

---

## [Making a simple wrapper for an IO stream](https://discourse.julialang.org/t/making-a-simple-wrapper-for-an-io-stream/52587)

<div class="topic-metadata">

**Author:** [@sijo](https://discourse.julialang.org/u/sijo)\
**Replies:** 9\
**Last updated:** [February 9, 2021, 5:21am UTC](https://discourse.julialang.org/t/making-a-simple-wrapper-for-an-io-stream/52587 "2021-02-09T05:21:58Z")

</div>

I want to make a type that wraps an IO stream and measures how much data is read through (or written to) it. Something like this: mutable struct MeasuredStream \<: IO io::IO nread::Int nwritten::Int MeasuredStre…

---

## [Multidimensional data interpolation](https://discourse.julialang.org/t/multidimensional-data-interpolation/54859)

<div class="topic-metadata">

**Author:** [@taeukseo](https://discourse.julialang.org/u/taeukseo)\
**Replies:** 6\
**Last updated:** [February 8, 2021, 11:48pm UTC](https://discourse.julialang.org/t/multidimensional-data-interpolation/54859 "2021-02-08T23:48:41Z")

</div>

I have been struggling to perform multidimensional interpolation using values. What I have at the moment are the following: A: a vector of length a . B: a vector of length b. C: a vector of length c. V : realizations…

---

## [Keeping Julia structure in memory between embedded function calls from C++](https://discourse.julialang.org/t/keeping-julia-structure-in-memory-between-embedded-function-calls-from-c/54870)

<div class="topic-metadata">

**Author:** [@JuliaPerson](https://discourse.julialang.org/u/JuliaPerson)\
**Replies:** 0\
**Last updated:** [February 8, 2021, 8:51pm UTC](https://discourse.julialang.org/t/keeping-julia-structure-in-memory-between-embedded-function-calls-from-c/54870 "2021-02-08T20:51:40Z")

</div>

So I have a Julia package. I would like to make use of the package in C++. From what I can tell from the documentation, only arrays and scalars can be passed between the C++/Julia boundary. In particular I’m using the R…

---

## [Converting a vector of structs to a struct of vectors](https://discourse.julialang.org/t/converting-a-vector-of-structs-to-a-struct-of-vectors/54800)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 3\
**Last updated:** [February 8, 2021, 8:09pm UTC](https://discourse.julialang.org/t/converting-a-vector-of-structs-to-a-struct-of-vectors/54800 "2021-02-08T20:09:13Z")

</div>

Hello, I have the following struct: using Rotations, StaticArrays const MyFloat = Float32 const SEGMENTS = 7 # number of tether segments struct SysState time::Float64 # time…

---

## [Is there a way to use the 4-argument \`@nloops\` with \`@generated\` on Julia 1.6?](https://discourse.julialang.org/t/is-there-a-way-to-use-the-4-argument-nloops-with-generated-on-julia-1-6/54830)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [February 8, 2021, 5:22pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-use-the-4-argument-nloops-with-generated-on-julia-1-6/54830 "2021-02-08T17:22:19Z")

</div>

Is there a way to use the 4-argument @nloops with @generated on Julia 1.6? Since the last argument is an anonymous function, it triggers an error about purity now. StatsBase currently uses that so it fails on nightlies: h…

---

## [GLMakie performance and Julia 1.6](https://discourse.julialang.org/t/glmakie-performance-and-julia-1-6/54854)

<div class="topic-metadata">

**Author:** [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Replies:** 0\
**Last updated:** [February 8, 2021, 5:08pm UTC](https://discourse.julialang.org/t/glmakie-performance-and-julia-1-6/54854 "2021-02-08T17:08:21Z")

</div>

I have to make hundreds of plots and was using GLMakie and the png backend, I was quite disappointed with the Performance, 800 plots took ~1.5h and GLMakie cannot be used with threads. This was on the 1.6 release branch. …

---

## [I'm trying to add a basic dependency to a package I'm creating and getting the fol](https://discourse.julialang.org/t/im-trying-to-add-a-basic-dependency-to-a-package-im-creating-and-getting-the-fol/54258)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 7\
**Last updated:** [February 8, 2021, 3:39pm UTC](https://discourse.julialang.org/t/im-trying-to-add-a-basic-dependency-to-a-package-im-creating-and-getting-the-fol/54258 "2021-02-08T15:39:29Z")

</div>

I’m trying to add a basic dependency to a package I’m creating and getting the following error. Can’t seem to find anything online. Anybody know what might be happening here? I followed PkgTemplates to create everything …

---

## [Importing modules after having included them in the Main module](https://discourse.julialang.org/t/importing-modules-after-having-included-them-in-the-main-module/54836)

<div class="topic-metadata">

**Author:** [@Valery](https://discourse.julialang.org/u/Valery)\
**Replies:** 4\
**Last updated:** [February 8, 2021, 3:11pm UTC](https://discourse.julialang.org/t/importing-modules-after-having-included-them-in-the-main-module/54836 "2021-02-08T15:11:23Z")

</div>

Hi all, I want to import some modules containing variables and functions for my project. Down below is a simplified version of my Main module (forward / in Linux). Why does such an error occur ? module Main include("M…

---

## [About garbage collection](https://discourse.julialang.org/t/about-garbage-collection/54845)

<div class="topic-metadata">

**Author:** [@ReneganRonin](https://discourse.julialang.org/u/ReneganRonin)\
**Replies:** 3\
**Last updated:** [February 8, 2021, 3:11pm UTC](https://discourse.julialang.org/t/about-garbage-collection/54845 "2021-02-08T15:11:03Z")

</div>

How does garbage collection work in julia? Does it affect high performance scientific computing? As someone with no computer science background, and also new to programming, should i worry about it in the future? Also…

---

## [Package recommendations for the task of modeling a multivariate nonlinear stiff system with a black box modeling method](https://discourse.julialang.org/t/package-recommendations-for-the-task-of-modeling-a-multivariate-nonlinear-stiff-system-with-a-black-box-modeling-method/40978)

<div class="topic-metadata">

**Author:** [@Volker](https://discourse.julialang.org/u/Volker)\
**Replies:** 4\
**Last updated:** [February 8, 2021, 2:25pm UTC](https://discourse.julialang.org/t/package-recommendations-for-the-task-of-modeling-a-multivariate-nonlinear-stiff-system-with-a-black-box-modeling-method/40978 "2021-02-08T14:25:37Z")

</div>

Hi, I´m looking for a black box method, which can deal with nonlinear multivariate stiff systems. With stiff I mean a system, which has quite fast but also quite slow time constants. Are there any recommendations which J…

---

## [Collection union/intersection/etc](https://discourse.julialang.org/t/collection-union-intersection-etc/54804)

<div class="topic-metadata">

**Author:** [@fph](https://discourse.julialang.org/u/fph)\
**Replies:** 1\
**Last updated:** [February 8, 2021, 2:18pm UTC](https://discourse.julialang.org/t/collection-union-intersection-etc/54804 "2021-02-08T14:18:04Z")

</div>

Some common binary operations come with a separate method that reduces a collection with it; for instance sum is the reduction form of + or prod is the reduction form of \*. Is there a reduction form for intersect and uni…

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

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