# Latest

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

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

**Page:** 1069

---

## [Performance of \`zero\`, \`oneunit\` etc. in constructing unsigned ranges](https://discourse.julialang.org/t/performance-of-zero-oneunit-etc-in-constructing-unsigned-ranges/79470)

<div class="topic-metadata">

**Author:** [@maxkapur](https://discourse.julialang.org/u/maxkapur)\
**Replies:** 5\
**Last updated:** [April 14, 2022, 7:26am UTC](https://discourse.julialang.org/t/performance-of-zero-oneunit-etc-in-constructing-unsigned-ranges/79470 "2022-04-14T07:26:32Z")

</div>

In my code, I often need to iterate over the range 0:m or 1:m where the type of each range element is a primitive type T, usually UInt8 or UInt16. m itself is already of type T. This leaves me with many options for spe…

---

## [How to speed up the for-loop with dataframe access](https://discourse.julialang.org/t/how-to-speed-up-the-for-loop-with-dataframe-access/79447)

<div class="topic-metadata">

**Author:** [@tiZ](https://discourse.julialang.org/u/tiZ)\
**Replies:** 25\
**Last updated:** [April 14, 2022, 6:44am UTC](https://discourse.julialang.org/t/how-to-speed-up-the-for-loop-with-dataframe-access/79447 "2022-04-14T06:44:18Z")

</div>

Hi, I am new to Julia from R, and I have a little trouble in learning how to speed up my code. for a simple demo example, I have a DataFrame with 3 column X 8679568 row, each row is a record of protein pair. The row 1 …

---

## [Error update any packages in julia1.7.1](https://discourse.julialang.org/t/error-update-any-packages-in-julia1-7-1/73578)

<div class="topic-metadata">

**Author:** [@samuel\_Yi](https://discourse.julialang.org/u/samuel_Yi)\
**Replies:** 2\
**Last updated:** [April 14, 2022, 5:40am UTC](https://discourse.julialang.org/t/error-update-any-packages-in-julia1-7-1/73578 "2022-04-14T05:40:29Z")

</div>

Info: julia\> using InteractiveUtils; versioninfo() Julia Version 1.7.1 Commit ac5cc99908 (2021-12-22 19:35 UTC) Platform Info: OS: Windows (x86\_64-w64-mingw32) CPU: Intel(R) Core™ i7-8700 CPU @ 3.20GHz WORD\_SIZE: 64 LIB…

---

## [Remove package from environment in Julia](https://discourse.julialang.org/t/remove-package-from-environment-in-julia/79435)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 11\
**Last updated:** [April 14, 2022, 5:19am UTC](https://discourse.julialang.org/t/remove-package-from-environment-in-julia/79435 "2022-04-14T05:19:50Z")

</div>

Hello, I am loading packages in the environment with using LIBRARY. Is there a way to remove that package from the environment? something like R’s detach? Thanks

---

## [PyPlot for PythonCall](https://discourse.julialang.org/t/pyplot-for-pythoncall/79407)

<div class="topic-metadata">

**Author:** [@goerz](https://discourse.julialang.org/u/goerz)\
**Replies:** 3\
**Last updated:** [April 14, 2022, 2:27am UTC](https://discourse.julialang.org/t/pyplot-for-pythoncall/79407 "2022-04-14T02:27:20Z")

</div>

The PyPlot backend for Plots.jl only works with PyCall, right? How hard would it be to make work with PythonCall instead (so I don’t even have to have PyCall installed). I’d very much appreciate the full environment isol…

---

## [My Julia setup for vim with YCM on Linux](https://discourse.julialang.org/t/my-julia-setup-for-vim-with-ycm-on-linux/45485)

<div class="topic-metadata">

**Author:** [@junix](https://discourse.julialang.org/u/junix)\
**Replies:** 15\
**Last updated:** [April 14, 2022, 12:47am UTC](https://discourse.julialang.org/t/my-julia-setup-for-vim-with-ycm-on-linux/45485 "2022-04-14T00:47:36Z")

</div>

Installation $ pip install jill --user -U $ jill install 1.3 lsp Plug 'ycm-core/YouCompleteMe' Plug 'ycm-core/lsp-examples' Plug 'JuliaEditorSupport/julia-vim', {'for': 'julia'} let g:ycm\_language\_server = \[ \\ { …

---

## [Sort the output of eigs by the eigenvalues](https://discourse.julialang.org/t/sort-the-output-of-eigs-by-the-eigenvalues/79455)

<div class="topic-metadata">

**Author:** [@ahmed](https://discourse.julialang.org/u/ahmed)\
**Replies:** 6\
**Last updated:** [April 14, 2022, 12:14am UTC](https://discourse.julialang.org/t/sort-the-output-of-eigs-by-the-eigenvalues/79455 "2022-04-14T00:14:07Z")

</div>

I’m using eigs to find the two eigenvalues with the largest magnitude near a value sigma. One of the eigenvalues is negative while the other is positive. How can I get eigs to give me the eigenvalues/eigenvectors sorted …

---

## [Trouble passing struct to C function](https://discourse.julialang.org/t/trouble-passing-struct-to-c-function/79403)

<div class="topic-metadata">

**Author:** [@Octogonapus](https://discourse.julialang.org/u/Octogonapus)\
**Replies:** 7\
**Last updated:** [April 13, 2022, 11:47pm UTC](https://discourse.julialang.org/t/trouble-passing-struct-to-c-function/79403 "2022-04-13T23:47:24Z")

</div>

I am trying to wrap a JLL I’m authoring and as part of creating the wrapper, I’m writing some tests. In this test, I create an instance of a struct: conn\_options = Ref(aws\_mqtt\_connection\_options( host\_name\_cur\[\], …

---

## [Bayesian Neural Network](https://discourse.julialang.org/t/bayesian-neural-network/79363)

<div class="topic-metadata">

**Author:** [@Aminath\_Shausan](https://discourse.julialang.org/u/Aminath_Shausan)\
**Replies:** 5\
**Last updated:** [April 13, 2022, 11:17pm UTC](https://discourse.julialang.org/t/bayesian-neural-network/79363 "2022-04-13T23:17:38Z")

</div>

Hi, I am in the early stage of learning to code Neural Networks using Flux. However I thought to use Bayesian Neural Network (BNN), Both for the sake of overcoming the problem of overfitting and need a way to explain …

---

## [Concatenate csv files without loading them](https://discourse.julialang.org/t/concatenate-csv-files-without-loading-them/35527)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 10\
**Last updated:** [April 13, 2022, 9:56pm UTC](https://discourse.julialang.org/t/concatenate-csv-files-without-loading-them/35527 "2022-04-13T21:56:20Z")

</div>

I’m wondering what the best way would be to concatenate multiple CSV files – all of which contain the same header row (they are compatible) – into one CSV file. I know I can do something like (taken from @Chris\_Foster’s…

---

## [Makie Unfilled Polygons](https://discourse.julialang.org/t/makie-unfilled-polygons/79440)

<div class="topic-metadata">

**Author:** [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Replies:** 4\
**Last updated:** [April 13, 2022, 9:10pm UTC](https://discourse.julialang.org/t/makie-unfilled-polygons/79440 "2022-04-13T21:10:17Z")

</div>

Hi, what is the syntax to plot unfilled/empty polygons (via Makie.poly!) ?

---

## [What is the fastest, vector or array?](https://discourse.julialang.org/t/what-is-the-fastest-vector-or-array/79399)

<div class="topic-metadata">

**Author:** [@Leticia-maria](https://discourse.julialang.org/u/Leticia-maria)\
**Replies:** 4\
**Last updated:** [April 13, 2022, 8:42pm UTC](https://discourse.julialang.org/t/what-is-the-fastest-vector-or-array/79399 "2022-04-13T20:42:18Z")

</div>

Hi there, I would like to know what do you think about the performance of different types: vector and array. Whic one is the fastest?

---

## [Proper declaration of function accepting Dicts with mixed number types](https://discourse.julialang.org/t/proper-declaration-of-function-accepting-dicts-with-mixed-number-types/79184)

<div class="topic-metadata">

**Author:** [@fergu](https://discourse.julialang.org/u/fergu)\
**Replies:** 13\
**Last updated:** [April 13, 2022, 6:26pm UTC](https://discourse.julialang.org/t/proper-declaration-of-function-accepting-dicts-with-mixed-number-types/79184 "2022-04-13T18:26:45Z")

</div>

I have a function that accepts a dictionary as input where the arguments will always be string keys with values that are a vector of real numbers. They may in practice be integers or floats or whatever. What is important…

---

## [A problem with JuMP variable defined](https://discourse.julialang.org/t/a-problem-with-jump-variable-defined/79365)

<div class="topic-metadata">

**Author:** [@mahon](https://discourse.julialang.org/u/mahon)\
**Replies:** 2\
**Last updated:** [April 13, 2022, 6:06pm UTC](https://discourse.julialang.org/t/a-problem-with-jump-variable-defined/79365 "2022-04-13T18:06:46Z")

</div>

i want constraint my variable Pg , how can i do?

---

## [Distributions.jl: is it possible to define a Normal+Dirac mixture distribution?](https://discourse.julialang.org/t/distributions-jl-is-it-possible-to-define-a-normal-dirac-mixture-distribution/79429)

<div class="topic-metadata">

**Author:** [@Vincent\_Picaud](https://discourse.julialang.org/u/Vincent_Picaud)\
**Replies:** 6\
**Last updated:** [April 13, 2022, 5:04pm UTC](https://discourse.julialang.org/t/distributions-jl-is-it-possible-to-define-a-normal-dirac-mixture-distribution/79429 "2022-04-13T17:04:11Z")

</div>

I want to manipulate a distribution mixture of the form \\pi\\delta\_{x\_0}+(1-\\pi)\\mathcal{N}(\\mu,\\sigma) I have checked that I can create a mixture of Normal & Cauchy, by example: julia\> using Disributions.jl julia\> M…

---

## [Should broadcasting be avoided for type unstable code?](https://discourse.julialang.org/t/should-broadcasting-be-avoided-for-type-unstable-code/79438)

<div class="topic-metadata">

**Author:** [@jules](https://discourse.julialang.org/u/jules)\
**Replies:** 3\
**Last updated:** [April 13, 2022, 3:55pm UTC](https://discourse.julialang.org/t/should-broadcasting-be-avoided-for-type-unstable-code/79438 "2022-04-13T15:55:35Z")

</div>

This simple expression incurs an overhead of 0.13 seconds in a fresh REPL (Julia 1.7.1). julia\> @time (x -\> x .+ 1)(Any\[2\]) 0.128635 seconds (458.42 k allocations: 25.632 MiB, 11.29% gc time, 99.23% compilation time) …

---

## [Can I unexport something?](https://discourse.julialang.org/t/can-i-unexport-something/79436)

<div class="topic-metadata">

**Author:** [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Replies:** 3\
**Last updated:** [April 13, 2022, 3:55pm UTC](https://discourse.julialang.org/t/can-i-unexport-something/79436 "2022-04-13T15:55:01Z")

</div>

I’m using a macro which exports something that I don’t want exported. Is there some Base.DarkMagic.\_remove\_export\_binding\_assuming\_P\_eq\_NP function I can use for that?

---

## [Defining Non Linear Vector Constraints in JuMP](https://discourse.julialang.org/t/defining-non-linear-vector-constraints-in-jump/4742)

<div class="topic-metadata">

**Author:** [@acauligi](https://discourse.julialang.org/u/acauligi)\
**Replies:** 5\
**Last updated:** [April 13, 2022, 3:49pm UTC](https://discourse.julialang.org/t/defining-non-linear-vector-constraints-in-jump/4742 "2022-04-13T15:49:54Z")

</div>

I’m trying to implement pseudospectral methods using JuMP & Ipopt. The state is n-dimensional and control m-dimensional and the values are evaluated at N+1 collocation points; in this particular problem, n=3, m=3, and N …

---

## [How to make type parameter for \`Tuple\` represent both abstract type and concrete type?](https://discourse.julialang.org/t/how-to-make-type-parameter-for-tuple-represent-both-abstract-type-and-concrete-type/79420)

<div class="topic-metadata">

**Author:** [@frankwswang](https://discourse.julialang.org/u/frankwswang)\
**Replies:** 3\
**Last updated:** [April 13, 2022, 3:23pm UTC](https://discourse.julialang.org/t/how-to-make-type-parameter-for-tuple-represent-both-abstract-type-and-concrete-type/79420 "2022-04-13T15:23:24Z")

</div>

julia\> t1 = NTuple{2, Real} Tuple{Real, Real} julia\> t2 = NTuple{2, T} where {T\<:Real} Tuple{T, T} where T\<:Real julia\> t1 \<: t2 false julia\> t3 = NTuple{2, \<:T} where {T\<:Real} Tuple{var"#s1", var"#s1"} where {T\<:Rea…

---

## [Significant digits in an csv file](https://discourse.julialang.org/t/significant-digits-in-an-csv-file/79430)

<div class="topic-metadata">

**Author:** [@DaWa](https://discourse.julialang.org/u/DaWa)\
**Replies:** 5\
**Last updated:** [April 13, 2022, 3:32pm UTC](https://discourse.julialang.org/t/significant-digits-in-an-csv-file/79430 "2022-04-13T15:32:49Z")

</div>

Hello all, I am reading in a lot of CSV files and create a DF using DataFrame(CSV.File("C:/Users/.../$id.csv", header=\["date", "tmax"\])) Now I would like to have the number of significant digits of tmax as a new colum…

---

## [JuMP problem get conflicting constraints when using small values](https://discourse.julialang.org/t/jump-problem-get-conflicting-constraints-when-using-small-values/79425)

<div class="topic-metadata">

**Author:** [@this\_josh](https://discourse.julialang.org/u/this_josh)\
**Replies:** 4\
**Last updated:** [April 13, 2022, 2:04pm UTC](https://discourse.julialang.org/t/jump-problem-get-conflicting-constraints-when-using-small-values/79425 "2022-04-13T14:04:04Z")

</div>

In JuMP I’m having problems getting conflicting equality constraints when using small values using JuMP using Gurobi model = Model(Gurobi.Optimizer) @variable(model, x) a = 5e-5 b = 3e-3 @constraint(model, c1, x == 0)…

---

## [I keep getting this error--- syntax: invalid iteration specification](https://discourse.julialang.org/t/i-keep-getting-this-error-syntax-invalid-iteration-specification/79357)

<div class="topic-metadata">

**Author:** [@Eric.O](https://discourse.julialang.org/u/Eric.O)\
**Replies:** 13\
**Last updated:** [April 13, 2022, 1:56pm UTC](https://discourse.julialang.org/t/i-keep-getting-this-error-syntax-invalid-iteration-specification/79357 "2022-04-13T13:56:18Z")

</div>

I am trying to run this code in code in Julia but I keep getting this error which am struggling to correct. syntax: invalid iteration specification Any help will be much appreciated please. Below is my code: x = …

---

## [Julia V1.7 about JuMP](https://discourse.julialang.org/t/julia-v1-7-about-jump/79433)

<div class="topic-metadata">

**Author:** [@EdBa](https://discourse.julialang.org/u/EdBa)\
**Replies:** 0\
**Last updated:** [April 13, 2022, 11:58am UTC](https://discourse.julialang.org/t/julia-v1-7-about-jump/79433 "2022-04-13T11:58:28Z")

</div>

Hello, Something strange just happened. I was working using JuMP since few days and now it’s a bug. Is there any explanation? how can I fix the problem? This is the error message I got: Failed to precompile JuMP \[4076…

---

## [Formatted Docstring Duplicated when Overloading Function Definition in Seperate Cells](https://discourse.julialang.org/t/formatted-docstring-duplicated-when-overloading-function-definition-in-seperate-cells/79390)

<div class="topic-metadata">

**Author:** [@Sharkful](https://discourse.julialang.org/u/Sharkful)\
**Replies:** 1\
**Last updated:** [April 13, 2022, 11:38am UTC](https://discourse.julialang.org/t/formatted-docstring-duplicated-when-overloading-function-definition-in-seperate-cells/79390 "2022-04-13T11:38:40Z")

</div>

I think I may have found a bug, but I’ve never made a issue on an open source project before, and I wanted a sanity check to see if it is worth creating. Minimum Working Example: Cell 1: "Test String" function somefunc1…

---

## [Scatter plot multiple series that don't share the same x values (Plots.jl)](https://discourse.julialang.org/t/scatter-plot-multiple-series-that-dont-share-the-same-x-values-plots-jl/79419)

<div class="topic-metadata">

**Author:** [@ahmed](https://discourse.julialang.org/u/ahmed)\
**Replies:** 2\
**Last updated:** [April 13, 2022, 9:09am UTC](https://discourse.julialang.org/t/scatter-plot-multiple-series-that-dont-share-the-same-x-values-plots-jl/79419 "2022-04-13T09:09:15Z")

</div>

I have three series of data that I would like to show on a scatter plot. Let’s say (x1,y1), (x2,y2) and (x3,y3). x’s and y’s are arrays that do not have the same size. How can I make a plot that shows them together? I t…

---

## [What do you think? add a callback to Documents.Page() to allow modification of \*.md pages on the fly before parsing](https://discourse.julialang.org/t/what-do-you-think-add-a-callback-to-documents-page-to-allow-modification-of-md-pages-on-the-fly-before-parsing/79217)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 10\
**Last updated:** [April 13, 2022, 9:53am UTC](https://discourse.julialang.org/t/what-do-you-think-add-a-callback-to-documents-page-to-allow-modification-of-md-pages-on-the-fly-before-parsing/79217 "2022-04-13T09:53:22Z")

</div>

Hello, for my project I need to add some common parts to the markdown files that will be processed by Documenter.jl to become HTML pages, like a footer section to add a @raw html block to allow comments, a sort of heade…

---

## [Combining @sync and @async with for and while loops](https://discourse.julialang.org/t/combining-sync-and-async-with-for-and-while-loops/79424)

<div class="topic-metadata">

**Author:** [@Tine](https://discourse.julialang.org/u/Tine)\
**Replies:** 0\
**Last updated:** [April 13, 2022, 9:44am UTC](https://discourse.julialang.org/t/combining-sync-and-async-with-for-and-while-loops/79424 "2022-04-13T09:44:33Z")

</div>

I am relatively new to Julia, and I am trying to understand the @sync and @async macro, and how they act when combined with for and while loops. I wonder if someone could tell me what the difference between these two ar…

---

## [Broadcasting error diffeqflux](https://discourse.julialang.org/t/broadcasting-error-diffeqflux/79417)

<div class="topic-metadata">

**Author:** [@YitaoCai](https://discourse.julialang.org/u/YitaoCai)\
**Replies:** 4\
**Last updated:** [April 13, 2022, 9:34am UTC](https://discourse.julialang.org/t/broadcasting-error-diffeqflux/79417 "2022-04-13T09:34:21Z")

</div>

Built a model according to the augmented Neural ODE tutorial as follows: @with\_kw struct Args η = 1e-3 # learning rate λ = 0.01f0 # regularization paramater batch\_size = 64 …

---

## [Convert hash digest to UInt256](https://discourse.julialang.org/t/convert-hash-digest-to-uint256/79307)

<div class="topic-metadata">

**Author:** [@jj-404](https://discourse.julialang.org/u/jj-404)\
**Replies:** 11\
**Last updated:** [April 13, 2022, 8:37am UTC](https://discourse.julialang.org/t/convert-hash-digest-to-uint256/79307 "2022-04-13T08:37:45Z")

</div>

Hello guys, I need to convert the output of sha256 to a UInt256. What is the optimal way to do that performance-wise? using SHA, BitIntegers x=sha256("okok") # convert(UInt256, x) for context, sha256 returns a Vector{…

---

## [100 Exercises with Solutions in Julia](https://discourse.julialang.org/t/100-exercises-with-solutions-in-julia/79178)

<div class="topic-metadata">

**Author:** [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Replies:** 2\
**Last updated:** [April 9, 2022, 11:55am UTC](https://discourse.julialang.org/t/100-exercises-with-solutions-in-julia/79178 "2022-04-09T11:55:41Z")

</div>

Based on 100 NumPy Exercises and inspired by a similar initiative I created 100 Julia Exercises with Solutions. By doing this I have learned a lot on Julia (Mainly better use of Array Comprehensions) and had a great tim…

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

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