# Latest

**URL:** https://discourse.julialang.org/latest.md?page=1496

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

**Page:** 1497

---

## [@cuda threads and blocks confusion](https://discourse.julialang.org/t/cuda-threads-and-blocks-confusion/54816)

<div class="topic-metadata">

**Author:** [@Ribeiro](https://discourse.julialang.org/u/Ribeiro)\
**Replies:** 9\
**Last updated:** [February 10, 2021, 8:20am UTC](https://discourse.julialang.org/t/cuda-threads-and-blocks-confusion/54816 "2021-02-10T08:20:24Z")

</div>

I would really appreciate some help in understanding the threads and blocks options when using @cuda. I read this: https://juliagpu.gitlab.io/CUDA.jl/tutorials/introduction/ and watched this GPU Programming in Julia - Y…

---

## [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…

---

## [Need help with multivariate multi-step timeseries prediction using RNN](https://discourse.julialang.org/t/need-help-with-multivariate-multi-step-timeseries-prediction-using-rnn/54966)

<div class="topic-metadata">

**Author:** [@UtkarshChemE](https://discourse.julialang.org/u/UtkarshChemE)\
**Replies:** 0\
**Last updated:** [February 10, 2021, 5:29am UTC](https://discourse.julialang.org/t/need-help-with-multivariate-multi-step-timeseries-prediction-using-rnn/54966 "2021-02-10T05:29:40Z")

</div>

My network is as follows: LSTM Encoder (Take a sequence of n lags and output a hidden end vector) Fully Connected Dense Layer (To create a context vector) Decoder network (LSTM layer that process context vector for m l…

---

## [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

---

## [\[ANN\] New version of Merly.jl v1.0](https://discourse.julialang.org/t/ann-new-version-of-merly-jl-v1-0/54958)

<div class="topic-metadata">

**Author:** [@codeneomatrix](https://discourse.julialang.org/u/codeneomatrix)\
**Replies:** 0\
**Last updated:** [February 9, 2021, 11:24pm UTC](https://discourse.julialang.org/t/ann-new-version-of-merly-jl-v1-0/54958 "2021-02-09T23:24:16Z")

</div>

Hi all, I’m glad to announce the new version of Merly; which is a micro framework for web applications, which allows to build applications more easily and quickly, thanks to its syntax and tools included. This version …

---

## [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…

---

## [Initializing Flux weights the same as PyTorch?](https://discourse.julialang.org/t/initializing-flux-weights-the-same-as-pytorch/54660)

<div class="topic-metadata">

**Author:** [@DevJac](https://discourse.julialang.org/u/DevJac)\
**Replies:** 4\
**Last updated:** [February 9, 2021, 10:04pm UTC](https://discourse.julialang.org/t/initializing-flux-weights-the-same-as-pytorch/54660 "2021-02-09T22:04:38Z")

</div>

I am trying to replicate some results from a PyTorch model. I believe layers in Flux have their weights initialized quite differently than in PyTorch. For example, Flux layers have 0 bias to begin with, but PyTorch layer…

---

## [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…

---

## [JuMP/CPLEX: retrieve value of array-variables in callback](https://discourse.julialang.org/t/jump-cplex-retrieve-value-of-array-variables-in-callback/54933)

<div class="topic-metadata">

**Author:** [@mike\_k](https://discourse.julialang.org/u/mike_k)\
**Replies:** 3\
**Last updated:** [February 9, 2021, 9:02pm UTC](https://discourse.julialang.org/t/jump-cplex-retrieve-value-of-array-variables-in-callback/54933 "2021-02-09T21:02:04Z")

</div>

Dear folks, I use JuMP (v0.21.4) and CPLEX (v0.7.3) and try to get the current variable values of sparse/dense-axis-array variables in a solver-specific callback. A quite long MWE based on the one in the documentation i…

---

## [Accessing data in a closure?](https://discourse.julialang.org/t/accessing-data-in-a-closure/54930)

<div class="topic-metadata">

**Author:** [@stefkuypers](https://discourse.julialang.org/u/stefkuypers)\
**Replies:** 12\
**Last updated:** [February 9, 2021, 8:38pm UTC](https://discourse.julialang.org/t/accessing-data-in-a-closure/54930 "2021-02-09T20:38:27Z")

</div>

Learning to work with closures. This is a construct to find out what is possible. foo(d, x, y) = d\[x\] = y struct Test f::Function Test(d::Dict, f::Function = (x, y) -\> foo(d, x, y)) = new(f) end t = Test…

---

## [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.…

---

## [How to sell Julia in 45 minutes?](https://discourse.julialang.org/t/how-to-sell-julia-in-45-minutes/54925)

<div class="topic-metadata">

**Author:** [@tisztamo](https://discourse.julialang.org/u/tisztamo)\
**Replies:** 7\
**Last updated:** [February 9, 2021, 7:00pm UTC](https://discourse.julialang.org/t/how-to-sell-julia-in-45-minutes/54925 "2021-02-09T19:00:13Z")

</div>

I am looking for ideas and possibly material for an intro talk. The audience is experienced but not homogenous: mostly developers, AI researchers and data scientists. The goal is to arouse interest, not to transfer usabl…

---

## [Very slow debugging reading files](https://discourse.julialang.org/t/very-slow-debugging-reading-files/54947)

<div class="topic-metadata">

**Author:** [@nandoconde](https://discourse.julialang.org/u/nandoconde)\
**Replies:** 3\
**Last updated:** [February 9, 2021, 6:35pm UTC](https://discourse.julialang.org/t/very-slow-debugging-reading-files/54947 "2021-02-09T18:35:34Z")

</div>

Hello! I am trying to go through my code step by step in VSCode and find it unbearably slow when it reaches a section in which it reads from files. As a matter of fact, I cannot debug at all because I had to wait for th…

---

## [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 …

---

## [Makie: adjusting axis scale / limits in 3D](https://discourse.julialang.org/t/makie-adjusting-axis-scale-limits-in-3d/29231)

<div class="topic-metadata">

**Author:** [@mihai](https://discourse.julialang.org/u/mihai)\
**Replies:** 5\
**Last updated:** [February 7, 2021, 8:10pm UTC](https://discourse.julialang.org/t/makie-adjusting-axis-scale-limits-in-3d/29231 "2021-02-07T20:10:10Z")

</div>

Hello, I would like to use very non-isotropic axis scales in 3D scatter plots. I can set the limits of the axis, but couldn’t find a working way of changing the data scaling in x/y/z (so that the plot is not overly stre…

---

## [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…

---

## [Possible bug in prepend!?](https://discourse.julialang.org/t/possible-bug-in-prepend/54917)

<div class="topic-metadata">

**Author:** [@askvorts](https://discourse.julialang.org/u/askvorts)\
**Replies:** 4\
**Last updated:** [February 9, 2021, 11:48am UTC](https://discourse.julialang.org/t/possible-bug-in-prepend/54917 "2021-02-09T11:48:55Z")

</div>

Came across the following unexpected asymmetric behaviour for push! and prepend! B = Vector{Date}() prepend!(B,Date(2021,2,2)) # Errors A = Vector{Date}() push!(A,Date(2021,2,2)) # OK But B = Vect…

---

## [Struggling with collection types](https://discourse.julialang.org/t/struggling-with-collection-types/54916)

<div class="topic-metadata">

**Author:** [@stefkuypers](https://discourse.julialang.org/u/stefkuypers)\
**Replies:** 1\
**Last updated:** [February 9, 2021, 10:56am UTC](https://discourse.julialang.org/t/struggling-with-collection-types/54916 "2021-02-09T10:56:19Z")

</div>

Still trying to get my head around the finesses of type hierarchies :slight\_smile: I created the following struct: struct Price components::Dict{String, Float64} precision::Int64 Price(;precision::Integer) …

---

## [Constructing a function at runtime to pass as an argument](https://discourse.julialang.org/t/constructing-a-function-at-runtime-to-pass-as-an-argument/54909)

<div class="topic-metadata">

**Author:** [@stefkuypers](https://discourse.julialang.org/u/stefkuypers)\
**Replies:** 6\
**Last updated:** [February 9, 2021, 10:49am UTC](https://discourse.julialang.org/t/constructing-a-function-at-runtime-to-pass-as-an-argument/54909 "2021-02-09T10:49:24Z")

</div>

HI, I’m trying to create a function at runtime to pass as a parameter to another function (Agents.random\_agent to be exact). I can pass a condition but the condition is dependant on the state of the current agent so I n…

---

## [Julia wrapper for SLEPc library](https://discourse.julialang.org/t/julia-wrapper-for-slepc-library/54910)

<div class="topic-metadata">

**Author:** [@bmxam](https://discourse.julialang.org/u/bmxam)\
**Replies:** 4\
**Last updated:** [February 9, 2021, 10:30am UTC](https://discourse.julialang.org/t/julia-wrapper-for-slepc-library/54910 "2021-02-09T10:30:06Z")

</div>

Hi every one, I have been using the SLEPc library (with fortran) for several years to solve large eigenvalues problems in parallel on distributed memory architectures. Since I have started to use julia for a while (and…

---

## [Help in using the Cbc solver](https://discourse.julialang.org/t/help-in-using-the-cbc-solver/52956)

<div class="topic-metadata">

**Author:** [@RaquelSantos](https://discourse.julialang.org/u/RaquelSantos)\
**Replies:** 10\
**Last updated:** [February 9, 2021, 10:27am UTC](https://discourse.julialang.org/t/help-in-using-the-cbc-solver/52956 "2021-02-09T10:27:46Z")

</div>

Hi Could someone help me in using Cbc. I don’t know what happens but every time I try to compile an error message appears. I’m using JuMP v0.18.6 and Cbc v0.7.1, I tried to update these packages but I couldn’t. Thank …

---

## [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…

[Previous page](https://discourse.julialang.org/latest.md?page=1495)

[Next page](https://discourse.julialang.org/latest.md?page=1497)
