# Latest

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

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

**Page:** 1492

---

## [Wierd output in vs code with julia with jupyter notebook?](https://discourse.julialang.org/t/wierd-output-in-vs-code-with-julia-with-jupyter-notebook/55145)

<div class="topic-metadata">

**Author:** [@Ravinder\_Ram](https://discourse.julialang.org/u/Ravinder_Ram)\
**Replies:** 4\
**Last updated:** [February 14, 2021, 4:40am UTC](https://discourse.julialang.org/t/wierd-output-in-vs-code-with-julia-with-jupyter-notebook/55145 "2021-02-14T04:40:14Z")

</div>

wierd output what should i do please help . I getting when i import dataset by csv.

---

## [Embedding julia: libLLVM-9jl.so not found](https://discourse.julialang.org/t/embedding-julia-libllvm-9jl-so-not-found/55085)

<div class="topic-metadata">

**Author:** [@crbinz](https://discourse.julialang.org/u/crbinz)\
**Replies:** 18\
**Last updated:** [February 14, 2021, 12:52am UTC](https://discourse.julialang.org/t/embedding-julia-libllvm-9jl-so-not-found/55085 "2021-02-14T00:52:41Z")

</div>

I’m trying to compile a simple C++ program that embeds some julia code. I’ve gotten this to work on macOS, but when trying to compile on my CentOS machine, I get this warning, followed by lots of errors: /usr/bin/ld: wa…

---

## [How to add constraints to parametric arguments](https://discourse.julialang.org/t/how-to-add-constraints-to-parametric-arguments/55231)

<div class="topic-metadata">

**Author:** [@Guillaume\_Leclerc](https://discourse.julialang.org/u/Guillaume_Leclerc)\
**Replies:** 11\
**Last updated:** [February 14, 2021, 12:38am UTC](https://discourse.julialang.org/t/how-to-add-constraints-to-parametric-arguments/55231 "2021-02-14T00:38:12Z")

</div>

Hello, Still trying to wrap my head around the type system of Julia. Any explanation why this is not allowed, and what would be the best way to achieve something similar? struct State{T::Int} end Is the only way to a…

---

## [How to load a module from the current directory?](https://discourse.julialang.org/t/how-to-load-a-module-from-the-current-directory/21727)

<div class="topic-metadata">

**Author:** [@HenrikM](https://discourse.julialang.org/u/HenrikM)\
**Replies:** 5\
**Last updated:** [February 13, 2021, 11:56pm UTC](https://discourse.julialang.org/t/how-to-load-a-module-from-the-current-directory/21727 "2021-02-13T23:56:07Z")

</div>

I thought it sufficed to add your current working directory to LOAD\_PATH to use modules from there, but apparently that is not so. Is the only way to get local code (for small scale dev/testing) to use include? I could s…

---

## [Welp! Swift for TensorFlow Archived](https://discourse.julialang.org/t/welp-swift-for-tensorflow-archived/55182)

<div class="topic-metadata">

**Author:** [@OmarElrefaei](https://discourse.julialang.org/u/OmarElrefaei)\
**Replies:** 11\
**Last updated:** [February 13, 2021, 11:54pm UTC](https://discourse.julialang.org/t/welp-swift-for-tensorflow-archived/55182 "2021-02-13T23:54:30Z")

</div>

---

## [Viewing a part of an array as a dictionary](https://discourse.julialang.org/t/viewing-a-part-of-an-array-as-a-dictionary/55233)

<div class="topic-metadata">

**Author:** [@circonflexe](https://discourse.julialang.org/u/circonflexe)\
**Replies:** 0\
**Last updated:** [February 13, 2021, 10:51pm UTC](https://discourse.julialang.org/t/viewing-a-part-of-an-array-as-a-dictionary/55233 "2021-02-13T22:51:37Z")

</div>

I have an array array (actually a Vector, to keep it simple), and I want to do work (let’s say call a function do\_work) on only those values indexed by some set S of indices of that vector. This subset has no reason to b…

---

## [Array of Mutable structs containing static arrays](https://discourse.julialang.org/t/array-of-mutable-structs-containing-static-arrays/55187)

<div class="topic-metadata">

**Author:** [@Guillaume\_Leclerc](https://discourse.julialang.org/u/Guillaume_Leclerc)\
**Replies:** 9\
**Last updated:** [February 13, 2021, 10:05pm UTC](https://discourse.julialang.org/t/array-of-mutable-structs-containing-static-arrays/55187 "2021-02-13T22:05:09Z")

</div>

Hello, I’m a new user coming from Python and C. I would like to: create a struct with arrays of known length as attribute. Be able to update these arrays after the creation Be able to allocate a multitude of these st…

---

## [Understanding how GC is triggered](https://discourse.julialang.org/t/understanding-how-gc-is-triggered/55015)

<div class="topic-metadata">

**Author:** [@bkamins](https://discourse.julialang.org/u/bkamins)\
**Replies:** 9\
**Last updated:** [February 13, 2021, 8:50pm UTC](https://discourse.julialang.org/t/understanding-how-gc-is-triggered/55015 "2021-02-13T20:50:52Z")

</div>

In the following comment https://github.com/JuliaData/DataFrames.jl/pull/2612#issuecomment-776914558 I have code and results of running it that I do not understand. Some calls to innerjoin function cause 90% GC time, alt…

---

## [How to check that a Symbol represents a function](https://discourse.julialang.org/t/how-to-check-that-a-symbol-represents-a-function/55124)

<div class="topic-metadata">

**Author:** [@maajdl](https://discourse.julialang.org/u/maajdl)\
**Replies:** 4\
**Last updated:** [February 13, 2021, 8:26pm UTC](https://discourse.julialang.org/t/how-to-check-that-a-symbol-represents-a-function/55124 "2021-02-13T20:26:04Z")

</div>

Hello I want to go through all the names in a module and find out those that represent a function. I tried something like: typeof(eval(:foo)) and in case :foo is a function, it returns: typeof(foo) From this I c…

---

## [Accessing every elements of an array except a certain range](https://discourse.julialang.org/t/accessing-every-elements-of-an-array-except-a-certain-range/55173)

<div class="topic-metadata">

**Author:** [@HoldenCaulfield](https://discourse.julialang.org/u/HoldenCaulfield)\
**Replies:** 10\
**Last updated:** [February 13, 2021, 8:05pm UTC](https://discourse.julialang.org/t/accessing-every-elements-of-an-array-except-a-certain-range/55173 "2021-02-13T20:05:25Z")

</div>

Hi all, I would like to access and modify the contents of an array except for a certain range. For instance, setting all elements of an array to value one, except for those elements whose indices are between 10-20 (like…

---

## [Same z-scale on plots3d with layout](https://discourse.julialang.org/t/same-z-scale-on-plots3d-with-layout/55221)

<div class="topic-metadata">

**Author:** [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Replies:** 0\
**Last updated:** [February 13, 2021, 6:22pm UTC](https://discourse.julialang.org/t/same-z-scale-on-plots3d-with-layout/55221 "2021-02-13T18:22:14Z")

</div>

Dear all, I have the following code to plot several curves in a layout form. using Plots plotly() pV = Vector{Any}(undef, 4); n=\[1,2,3,4\]; p=1 for i=1:2, j=1:2 z = n\[p\]\*t pV\[p\] = scatter3d(x,y,z,lw=1,ratio=1,m…

---

## [New concrete number type](https://discourse.julialang.org/t/new-concrete-number-type/55210)

<div class="topic-metadata">

**Author:** [@Joris\_Pinkse](https://discourse.julialang.org/u/Joris_Pinkse)\
**Replies:** 30\
**Last updated:** [February 13, 2021, 5:52pm UTC](https://discourse.julialang.org/t/new-concrete-number-type/55210 "2021-02-13T17:52:15Z")

</div>

Suppose that I want to define a new concrete type P (a probability). I want variables of type P to behave like floats except that e.g. passing a value of 1.1 to a function with argument of type P or assigning a value of…

---

## [Update on single dispatch benchmark comparison to C++](https://discourse.julialang.org/t/update-on-single-dispatch-benchmark-comparison-to-c/7283)

<div class="topic-metadata">

**Author:** [@cdsousa](https://discourse.julialang.org/u/cdsousa)\
**Replies:** 19\
**Last updated:** [February 13, 2021, 5:47pm UTC](https://discourse.julialang.org/t/update-on-single-dispatch-benchmark-comparison-to-c/7283 "2021-02-13T17:47:39Z")

</div>

Hi, I’m making an update of the benchmarks I had ran back in 2015, comparing the performance of Julia dispatch on single argument against C++ dispatch: Redirecting to Google Groups The code is in here: https://github.c…

---

## [Unexpected behavior: include() and @\_\_DIR\_\_](https://discourse.julialang.org/t/unexpected-behavior-include-and-dir/55218)

<div class="topic-metadata">

**Author:** [@JuergenD](https://discourse.julialang.org/u/JuergenD)\
**Replies:** 0\
**Last updated:** [February 13, 2021, 5:34pm UTC](https://discourse.julialang.org/t/unexpected-behavior-include-and-dir/55218 "2021-02-13T17:34:38Z")

</div>

I’m regularly using @doc read(joinpath(dirname(@\_\_DIR\_\_), "README.md"), String) MyModule for the (sub)module documentation. Unfortunately @DIR doesn’t behave like documented Base.@\_\_DIR\_\_ — Macro @\_\_DIR\_\_ -\> Abstract…

---

## [Neighborhood.jl: Unified API for finding nearest neighbors in Julia](https://discourse.julialang.org/t/neighborhood-jl-unified-api-for-finding-nearest-neighbors-in-julia/38659)

<div class="topic-metadata">

**Author:** [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Replies:** 15\
**Last updated:** [February 13, 2021, 5:35pm UTC](https://discourse.julialang.org/t/neighborhood-jl-unified-api-for-finding-nearest-neighbors-in-julia/38659 "2021-02-13T17:35:34Z")

</div>

I’d like to announce Neighborhood.jl, a new Julia package that has the following purpose: Provide a unified API for finding nearest (or approximately nearest) neighbors in Julia. The API is exceptionally simple (document…

---

## [Revise.jl doesn't appear to do anything](https://discourse.julialang.org/t/revise-jl-doesnt-appear-to-do-anything/54788)

<div class="topic-metadata">

**Author:** [@alice](https://discourse.julialang.org/u/alice)\
**Replies:** 63\
**Last updated:** [February 13, 2021, 4:52pm UTC](https://discourse.julialang.org/t/revise-jl-doesnt-appear-to-do-anything/54788 "2021-02-13T16:52:54Z")

</div>

I have a project called VCLR, and am trying to get Revise.jl to work, but it seems like it doesn’t do anything at all. I have a folder structure like this: VCLR ├── data │ └── ... data files ... ├── Project.toml ├── …

---

## [Efficient lexicographic ordering of custom types?](https://discourse.julialang.org/t/efficient-lexicographic-ordering-of-custom-types/55209)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 4\
**Last updated:** [February 13, 2021, 4:18pm UTC](https://discourse.julialang.org/t/efficient-lexicographic-ordering-of-custom-types/55209 "2021-02-13T16:18:15Z")

</div>

Suppose I have the Julia type struct Car model::String year::Int32 miles::Int32 end I’d like to overload the isless() function, to enable sorting variables of the type Array{Car, 1}. I would like to sort ac…

---

## [French translation of ThinkJulia](https://discourse.julialang.org/t/french-translation-of-thinkjulia/55088)

<div class="topic-metadata">

**Author:** [@aquarelleX332](https://discourse.julialang.org/u/aquarelleX332)\
**Replies:** 3\
**Last updated:** [February 13, 2021, 3:20pm UTC](https://discourse.julialang.org/t/french-translation-of-thinkjulia/55088 "2021-02-13T15:20:03Z")

</div>

Hello everyone, “Think Julia – Comment penser comme un informaticien” is a French translation of the book “ThinkJulia – How to Think Like a Computer scientist” by Ben Lauwens and Allen B. Downey (published in 2018). It …

---

## [Why is SVector faster than MVector](https://discourse.julialang.org/t/why-is-svector-faster-than-mvector/55174)

<div class="topic-metadata">

**Author:** [@Volker\_Weissmann](https://discourse.julialang.org/u/Volker_Weissmann)\
**Replies:** 13\
**Last updated:** [February 13, 2021, 4:07pm UTC](https://discourse.julialang.org/t/why-is-svector-faster-than-mvector/55174 "2021-02-13T16:07:34Z")

</div>

Why are these nearly identical function not compiled into the same llvm ir? using StaticArrays using BenchmarkTools function funcS() ret = SVector(0,0) ret = ret + SVector(123, 321) return ret end function f…

---

## [Automatic adjustment of ticks when zooming with Plots.jl](https://discourse.julialang.org/t/automatic-adjustment-of-ticks-when-zooming-with-plots-jl/5055)

<div class="topic-metadata">

**Author:** [@mzaffalon](https://discourse.julialang.org/u/mzaffalon)\
**Replies:** 3\
**Last updated:** [February 13, 2021, 4:07pm UTC](https://discourse.julialang.org/t/automatic-adjustment-of-ticks-when-zooming-with-plots-jl/5055 "2021-02-13T16:07:19Z")

</div>

In Plots.jl using pyplot as the backend, when I zoom in the plot using the pan/zoom button, the axes ticks are not automatically adjusted as PyPlot, nor the x,y coordinates at the bottom left of the plot window are displ…

---

## [Centralized platform for jobs related to Julia?](https://discourse.julialang.org/t/centralized-platform-for-jobs-related-to-julia/42937)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 6\
**Last updated:** [July 14, 2020, 4:00pm UTC](https://discourse.julialang.org/t/centralized-platform-for-jobs-related-to-julia/42937 "2020-07-14T16:00:57Z")

</div>

I was thinking about a centralized platform where people could post job opportunities related to Julia. Traditionally, the community has used Discourse, Slack and other forums to announce opportunities at their labs, ins…

---

## [Parametric type conversion without eval/repetition?](https://discourse.julialang.org/t/parametric-type-conversion-without-eval-repetition/54308)

<div class="topic-metadata">

**Author:** [@evanfields](https://discourse.julialang.org/u/evanfields)\
**Replies:** 10\
**Last updated:** [February 13, 2021, 2:25pm UTC](https://discourse.julialang.org/t/parametric-type-conversion-without-eval-repetition/54308 "2021-02-13T14:25:18Z")

</div>

Suppose I have several parametric wrapper types, like so (toy example): abstract type AbsWrapper end struct WrapperA{T \<: Real} \<: AbsWrapper x::T end struct WrapperB{T \<: Real} \<: AbsWrapper x::T end I’d like …

---

## [Truncating Floats into a specific Int size](https://discourse.julialang.org/t/truncating-floats-into-a-specific-int-size/55207)

<div class="topic-metadata">

**Author:** [@Libbum](https://discourse.julialang.org/u/Libbum)\
**Replies:** 2\
**Last updated:** [February 13, 2021, 2:24pm UTC](https://discourse.julialang.org/t/truncating-floats-into-a-specific-int-size/55207 "2021-02-13T14:24:43Z")

</div>

Hi all. julia\> floor(Int, convert(Float64, typemax(Int))) ERROR: InexactError: trunc(Int64, 9.223372036854776e18) I understand why this happens. What I’m looking for here is a nice way of truncating the pathological ca…

---

## [Get non-crossed factor from 2 or more other in StatModels](https://discourse.julialang.org/t/get-non-crossed-factor-from-2-or-more-other-in-statmodels/55176)

<div class="topic-metadata">

**Author:** [@PharmCat](https://discourse.julialang.org/u/PharmCat)\
**Replies:** 1\
**Last updated:** [February 13, 2021, 11:54am UTC](https://discourse.julialang.org/t/get-non-crossed-factor-from-2-or-more-other-in-statmodels/55176 "2021-02-13T11:54:55Z")

</div>

I have factor A and B, some levels of A “crossed” with levels of B, and some is “nested” example: A = \[ 1 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 1\] B = \[ 1 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 1 \] 1-st l…

---

## [Turing: help with slow model](https://discourse.julialang.org/t/turing-help-with-slow-model/54563)

<div class="topic-metadata">

**Author:** [@drbenvincent](https://discourse.julialang.org/u/drbenvincent)\
**Replies:** 46\
**Last updated:** [February 13, 2021, 11:19am UTC](https://discourse.julialang.org/t/turing-help-with-slow-model/54563 "2021-02-13T11:19:03Z")

</div>

So I’m making progress with implementing a bunch of models in Turing. But one I’ve had problems with is this. using Turing, StatsPlots sᵇ = \[15,11,15,14,15,18,16,16,18,16,15,13,18,12,11,13,17,18,16,11,17,18,12,18,18,14…

---

## [\[Turing.jl\] Censored Values](https://discourse.julialang.org/t/turing-jl-censored-values/48990)

<div class="topic-metadata">

**Author:** [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Replies:** 21\
**Last updated:** [February 13, 2021, 11:14am UTC](https://discourse.julialang.org/t/turing-jl-censored-values/48990 "2021-02-13T11:14:28Z")

</div>

Hi there Turing.jl peoples. Still new as ever to Bayes stuff, but having a blast learning(when I can). I ran into a situation where I want to explore censored modelling. I’ve scoured the documentation in Turing.jl and d…

---

## [VScode \_and\_ julia inside docker - Dockerfile?](https://discourse.julialang.org/t/vscode-and-julia-inside-docker-dockerfile/38630)

<div class="topic-metadata">

**Author:** [@jaynick](https://discourse.julialang.org/u/jaynick)\
**Replies:** 5\
**Last updated:** [February 13, 2021, 10:59am UTC](https://discourse.julialang.org/t/vscode-and-julia-inside-docker-dockerfile/38630 "2021-02-13T10:59:54Z")

</div>

Is anyhone running VScode and Julia inside a single docker container? Is there an example of a Dockerfile I could use a guide for how to do this? thank you for any replies.

---

## [Record from camera, save to file, and acess last recorded frame](https://discourse.julialang.org/t/record-from-camera-save-to-file-and-acess-last-recorded-frame/55200)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 0\
**Last updated:** [February 13, 2021, 10:33am UTC](https://discourse.julialang.org/t/record-from-camera-save-to-file-and-acess-last-recorded-frame/55200 "2021-02-13T10:33:00Z")

</div>

Caveat: After writing this post I realized that it has very little to do with Julia, but people here are super smart, maybe someone will know the answer… I want to record video from a camera, save it to file, and at the…

---

## [I am probably missing something very obvious. Can someone help me understand this?](https://discourse.julialang.org/t/i-am-probably-missing-something-very-obvious-can-someone-help-me-understand-this/55193)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [February 13, 2021, 9:14am UTC](https://discourse.julialang.org/t/i-am-probably-missing-something-very-obvious-can-someone-help-me-understand-this/55193 "2021-02-13T09:14:39Z")

</div>

I am probably missing something very obvious. Can someone help me understand this? foo\_string = "foo" foo\_dict = Dict("f"=&gt;0, "o"=&gt;0) this: haskey(foo\_dict, "f") returns: true but why does for char in foo\_str…

---

## [Different behaviour between Flux.jl and Pytorch](https://discourse.julialang.org/t/different-behaviour-between-flux-jl-and-pytorch/54941)

<div class="topic-metadata">

**Author:** [@DeepQ](https://discourse.julialang.org/u/DeepQ)\
**Replies:** 17\
**Last updated:** [February 13, 2021, 8:24am UTC](https://discourse.julialang.org/t/different-behaviour-between-flux-jl-and-pytorch/54941 "2021-02-13T08:24:21Z")

</div>

I am trying to generate the results of this paper https://arxiv.org/abs/1808.03856. I have created two similar models using Flux.jl and Pytorch. There is no equivalence to pytorch.gather function in Flux.jl, so I create…

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

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