# Latest

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

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

**Page:** 1768

---

## [How do I plot the estimated cumulative density function of some samples?](https://discourse.julialang.org/t/how-do-i-plot-the-estimated-cumulative-density-function-of-some-samples/38032)

<div class="topic-metadata">

**Author:** [@NightMachinary](https://discourse.julialang.org/u/NightMachinary)\
**Replies:** 6\
**Last updated:** [April 23, 2020, 5:03pm UTC](https://discourse.julialang.org/t/how-do-i-plot-the-estimated-cumulative-density-function-of-some-samples/38032 "2020-04-23T17:03:30Z")

</div>

I have some samples of a random variable, and I want to plot their cdf. What’s the best way to do this? I have currently tried: g1 = \[E(λ) for i = 1:n\] # generate the samples using StatsBase cdf = ecdf(g1) …

---

## [Error optimizing using autodifferentation](https://discourse.julialang.org/t/error-optimizing-using-autodifferentation/35478)

<div class="topic-metadata">

**Author:** [@rpm](https://discourse.julialang.org/u/rpm)\
**Replies:** 7\
**Last updated:** [April 23, 2020, 4:42pm UTC](https://discourse.julialang.org/t/error-optimizing-using-autodifferentation/35478 "2020-04-23T16:42:05Z")

</div>

I am a new Julia user working with the Optim package and trying to estimate a model (minimizing the sum of squared residuals), but receive an error (I read the PSA on posting–let me know if I could do any better in regar…

---

## [How can i Decode this Data?](https://discourse.julialang.org/t/how-can-i-decode-this-data/38084)

<div class="topic-metadata">

**Author:** [@imrankhan\_juliaLang](https://discourse.julialang.org/u/imrankhan_juliaLang)\
**Replies:** 2\
**Last updated:** [April 23, 2020, 3:32pm UTC](https://discourse.julialang.org/t/how-can-i-decode-this-data/38084 "2020-04-23T15:32:31Z")

</div>

How can i convert this data to numeric.

---

## [Generating a package with PkgTemplate for existing code](https://discourse.julialang.org/t/generating-a-package-with-pkgtemplate-for-existing-code/25163)

<div class="topic-metadata">

**Author:** [@tim-oh](https://discourse.julialang.org/u/tim-oh)\
**Replies:** 16\
**Last updated:** [April 23, 2020, 2:47pm UTC](https://discourse.julialang.org/t/generating-a-package-with-pkgtemplate-for-existing-code/25163 "2020-04-23T14:47:51Z")

</div>

I’ve been writing code a (first) Julia package with src and test folders. It’s saved on my laptop and pushed to a GitHub repo. I’d like to turn my code into a package so that it can be run by others, checks code coverage…

---

## [Outer constructor](https://discourse.julialang.org/t/outer-constructor/38086)

<div class="topic-metadata">

**Author:** [@QUANG\_VU\_NGUY\_N\_PH\_M](https://discourse.julialang.org/u/QUANG_VU_NGUY_N_PH_M)\
**Replies:** 2\
**Last updated:** [April 23, 2020, 2:24pm UTC](https://discourse.julialang.org/t/outer-constructor/38086 "2020-04-23T14:24:19Z")

</div>

My struct definition: struct DiscreteField{T} time::Vector{Float64} data::Vector{T} end I would like to create an outer constructor: function DiscreteField(data::Base.Iterators.Zip{Tuple{Vector{Float64},Vec…

---

## [Plots.jl legend: spacing between symbol and text](https://discourse.julialang.org/t/plots-jl-legend-spacing-between-symbol-and-text/38079)

<div class="topic-metadata">

**Author:** [@jamblejoe](https://discourse.julialang.org/u/jamblejoe)\
**Replies:** 2\
**Last updated:** [April 23, 2020, 2:01pm UTC](https://discourse.julialang.org/t/plots-jl-legend-spacing-between-symbol-and-text/38079 "2020-04-23T14:01:23Z")

</div>

Hi, is it possible to adjust the spacing between the symol and the text in the legend with Plot.jl? MWE: plot(\[1,2,3\], linewidth=5, legend=true, legendfontsize=30, ) produces Can the spacing between the…

---

## [CUDAnative test fails](https://discourse.julialang.org/t/cudanative-test-fails/38085)

<div class="topic-metadata">

**Author:** [@eaubanel](https://discourse.julialang.org/u/eaubanel)\
**Replies:** 2\
**Last updated:** [April 23, 2020, 1:59pm UTC](https://discourse.julialang.org/t/cudanative-test-fails/38085 "2020-04-23T13:59:33Z")

</div>

I’m experienced with C/CUDA, but trying CUDA with Julia for the first time, on a compute node of a research cluster running CentOS Linux release 7.6.1810 and eight Tesla V100-SXM2 GPUs: nvidia-smi±----------------------…

---

## [How to show the pin symbol in PowerShell Julia?](https://discourse.julialang.org/t/how-to-show-the-pin-symbol-in-powershell-julia/38081)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 1\
**Last updated:** [April 23, 2020, 1:21pm UTC](https://discourse.julialang.org/t/how-to-show-the-pin-symbol-in-powershell-julia/38081 "2020-04-23T13:21:11Z")

</div>

I use Julia on Windows and when I open the REPL ti says that it’s been run in PowerShell. Once I pin a package, I expect the pin symbol to appear next to the package, but on my machine it’s a rectangle containing a ques…

---

## [Finding the root of a minimize-maximize function](https://discourse.julialang.org/t/finding-the-root-of-a-minimize-maximize-function/38068)

<div class="topic-metadata">

**Author:** [@Xing\_Shi\_Cai](https://discourse.julialang.org/u/Xing_Shi_Cai)\
**Replies:** 1\
**Last updated:** [April 23, 2020, 11:54am UTC](https://discourse.julialang.org/t/finding-the-root-of-a-minimize-maximize-function/38068 "2020-04-23T11:54:55Z")

</div>

Let f1(x,y)=-(1 - x)\* y + 1/2\* (1 - x - x^2 - x^3 - 2\* (1 - x)\* y) f2(x,y)=(1 - 2\*x)\*(1 + x + x^2) - 2\*(-1 + x)^2\*(1 + x)\*y We can define a minimize, maximize function like this using IntervalOptimization g(x) = minim…

---

## [How to access the end index of an array as attribute of a class](https://discourse.julialang.org/t/how-to-access-the-end-index-of-an-array-as-attribute-of-a-class/38070)

<div class="topic-metadata">

**Author:** [@QUANG\_VU\_NGUY\_N\_PH\_M](https://discourse.julialang.org/u/QUANG_VU_NGUY_N_PH_M)\
**Replies:** 5\
**Last updated:** [April 23, 2020, 12:27pm UTC](https://discourse.julialang.org/t/how-to-access-the-end-index-of-an-array-as-attribute-of-a-class/38070 "2020-04-23T12:27:59Z")

</div>

struct Test data::Vector{Int} end Base.getindex(test::Test, index) = test.data\[index\] Then, to get idex: test = Test(\[1,2,3\]) I can get: test\[1\] test\[2\] How to get the last index value test\[end\] didnot work. …

---

## [Is there a way to remember my layout settings?](https://discourse.julialang.org/t/is-there-a-way-to-remember-my-layout-settings/29213)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 3\
**Last updated:** [April 23, 2020, 10:33am UTC](https://discourse.julialang.org/t/is-there-a-way-to-remember-my-layout-settings/29213 "2020-04-23T10:33:03Z")

</div>

I like to drap the REPL to be on the right instead of at the bottom. Is there way to persist this setting? When I open Atom, the REPL is always at the bottom.

---

## [ERROR: UndefVarError: T not defined / Weird Method Parameter Problem](https://discourse.julialang.org/t/error-undefvarerror-t-not-defined-weird-method-parameter-problem/32427)

<div class="topic-metadata">

**Author:** [@Qiyamah](https://discourse.julialang.org/u/Qiyamah)\
**Replies:** 7\
**Last updated:** [April 23, 2020, 7:46am UTC](https://discourse.julialang.org/t/error-undefvarerror-t-not-defined-weird-method-parameter-problem/32427 "2020-04-23T07:46:12Z")

</div>

abstract type Fun{T,R} \<: Function end struct TypedFun{T\<:Tuple,R} \<: Fun{T,R} fn::Function end function test(fun::Fun{Tuple{T},Vector{CV} where CV\<:T}) where T println(T) end function testy(fun::Fun{Tuple{T}…

---

## [Unexpected Core.Box from functions within a function](https://discourse.julialang.org/t/unexpected-core-box-from-functions-within-a-function/38022)

<div class="topic-metadata">

**Author:** [@mcabbott](https://discourse.julialang.org/u/mcabbott)\
**Replies:** 4\
**Last updated:** [April 23, 2020, 6:34am UTC](https://discourse.julialang.org/t/unexpected-core-box-from-functions-within-a-function/38022 "2020-04-23T06:34:14Z")

</div>

I was surprised that something like the following is slow, and not type-stable: function g(A) function make(A) B = similar(A) act!(B, A, axes(A, 1)) B end function act!(B, A, ax) …

---

## [Function doesn't show result](https://discourse.julialang.org/t/function-doesnt-show-result/38027)

<div class="topic-metadata">

**Author:** [@Jul](https://discourse.julialang.org/u/Jul)\
**Replies:** 3\
**Last updated:** [April 23, 2020, 6:32am UTC](https://discourse.julialang.org/t/function-doesnt-show-result/38027 "2020-04-23T06:32:00Z")

</div>

Hello! I wrote little function but its not show output. I am fresh in this language and I’ve no idea why it’s not work. My input is : f(x-\>1) after that program freezes. This is function: function f(func=x^2) a\_lower …

---

## [Training Halts when Using CuArrarys](https://discourse.julialang.org/t/training-halts-when-using-cuarrarys/38062)

<div class="topic-metadata">

**Author:** [@lpjiang97](https://discourse.julialang.org/u/lpjiang97)\
**Replies:** 0\
**Last updated:** [April 23, 2020, 4:40am UTC](https://discourse.julialang.org/t/training-halts-when-using-cuarrarys/38062 "2020-04-23T04:40:35Z")

</div>

(open issue here) I’m fairly new to CuArrays and Flux, and I met this problem of having halted training after some epochs. There is no CUDA out of memory error, but the usage is extremely high for this simple linear mod…

---

## [JuMP returning incorrect value after deleting/adding anonymous variable and constraint](https://discourse.julialang.org/t/jump-returning-incorrect-value-after-deleting-adding-anonymous-variable-and-constraint/38036)

<div class="topic-metadata">

**Author:** [@cby](https://discourse.julialang.org/u/cby)\
**Replies:** 2\
**Last updated:** [April 23, 2020, 2:20am UTC](https://discourse.julialang.org/t/jump-returning-incorrect-value-after-deleting-adding-anonymous-variable-and-constraint/38036 "2020-04-23T02:20:12Z")

</div>

When I use an anonymous variable and constraint, optimize, delete and re-add them, then optimize again, I get two different solutions, the second of which is incorrect. However, the model is still printing correctly. Wha…

---

## [Testing whether value is (or not) in array](https://discourse.julialang.org/t/testing-whether-value-is-or-not-in-array/37995)

<div class="topic-metadata">

**Author:** [@EricChameroy](https://discourse.julialang.org/u/EricChameroy)\
**Replies:** 4\
**Last updated:** [April 23, 2020, 1:30am UTC](https://discourse.julialang.org/t/testing-whether-value-is-or-not-in-array/37995 "2020-04-23T01:30:46Z")

</div>

Hi everyone, I understand that if I want to test if a given value is present in an array, I can use: value in array However, how do I go about testing if a given value is not in an array? So far, the only solution I c…

---

## [Dicts in different @async blocks](https://discourse.julialang.org/t/dicts-in-different-async-blocks/37640)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 8\
**Last updated:** [April 23, 2020, 12:33am UTC](https://discourse.julialang.org/t/dicts-in-different-async-blocks/37640 "2020-04-23T00:33:03Z")

</div>

It’s this safe? Using Dict async in the same thread? d = Dict() @async do\_something\_with\_d(d) @async do\_something\_else\_with\_d(d)

---

## [Scatter plot](https://discourse.julialang.org/t/scatter-plot/37987)

<div class="topic-metadata">

**Author:** [@AmandaPS22](https://discourse.julialang.org/u/AmandaPS22)\
**Replies:** 9\
**Last updated:** [April 23, 2020, 12:00am UTC](https://discourse.julialang.org/t/scatter-plot/37987 "2020-04-23T00:00:41Z")

</div>

Hi, I’m new to the JULIA language and I’m having trouble plotting a scatter plot. The command entered was: using PyPlot scatter(X.d, X.b, facecolor = “none”, edgecolors=“orange”, s=20, label=“xxx”) Then an error me…

---

## [Open up vim instance to write, then save the text to a variable?](https://discourse.julialang.org/t/open-up-vim-instance-to-write-then-save-the-text-to-a-variable/38047)

<div class="topic-metadata">

**Author:** [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Replies:** 6\
**Last updated:** [April 22, 2020, 10:46pm UTC](https://discourse.julialang.org/t/open-up-vim-instance-to-write-then-save-the-text-to-a-variable/38047 "2020-04-22T22:46:35Z")

</div>

When I do git commit, Git opens up a little Vim instance. Then I write in it and when I pres :wq, Git saves that text and it becomes the commit message. Is there any way to have such a workflow within julia? Not related…

---

## [How to save parallel outputs to the same file on HPC cluster](https://discourse.julialang.org/t/how-to-save-parallel-outputs-to-the-same-file-on-hpc-cluster/37993)

<div class="topic-metadata">

**Author:** [@zxjroger](https://discourse.julialang.org/u/zxjroger)\
**Replies:** 6\
**Last updated:** [April 22, 2020, 10:40pm UTC](https://discourse.julialang.org/t/how-to-save-parallel-outputs-to-the-same-file-on-hpc-cluster/37993 "2020-04-22T22:40:10Z")

</div>

I am doing Monte Carlo study on HPC cluster. I parallel the 100 Monte Carlo replications using job array in Slurm. I want to save the results of each replication to the same file. Let’s say for replication ID n, I have t…

---

## [Julia LLVM projects?](https://discourse.julialang.org/t/julia-llvm-projects/1349)

<div class="topic-metadata">

**Author:** [@Phil\_Tomson](https://discourse.julialang.org/u/Phil_Tomson)\
**Replies:** 31\
**Last updated:** [April 22, 2020, 9:28pm UTC](https://discourse.julialang.org/t/julia-llvm-projects/1349 "2020-04-22T21:28:01Z")

</div>

I just finished up an LLVM contract porting to a new processor architecture, I’ve got a bit of free time and was wondering where I might find a list of LLVM-related items/projects that need attention in Julia. I looked …

---

## [VScode Linter no longer working: The Julia Language Server server crashed](https://discourse.julialang.org/t/vscode-linter-no-longer-working-the-julia-language-server-server-crashed/35904)

<div class="topic-metadata">

**Author:** [@JosephPollacco](https://discourse.julialang.org/u/JosephPollacco)\
**Replies:** 10\
**Last updated:** [April 22, 2020, 9:25pm UTC](https://discourse.julialang.org/t/vscode-linter-no-longer-working-the-julia-language-server-server-crashed/35904 "2020-04-22T21:25:12Z")

</div>

I want first to thank the efforts of Prof. David Anthoff :smile: and Prof. Zac Nugent :grinning: for providing to the Julia community such an efficient tool which works very efficiently for large projects (building hydr…

---

## [Which protocols can be used for adding a package by Pkg add from a git server?](https://discourse.julialang.org/t/which-protocols-can-be-used-for-adding-a-package-by-pkg-add-from-a-git-server/38019)

<div class="topic-metadata">

**Author:** [@alirezamecheng](https://discourse.julialang.org/u/alirezamecheng)\
**Replies:** 9\
**Last updated:** [April 22, 2020, 9:24pm UTC](https://discourse.julialang.org/t/which-protocols-can-be-used-for-adding-a-package-by-pkg-add-from-a-git-server/38019 "2020-04-22T21:24:39Z")

</div>

Hello everyone, I’m configuring a server that will be a host for our Julia packages. I have made a private Julia registry that our users will add to their registry, and everything has been sat up to work in our private …

---

## [Exporting a surface](https://discourse.julialang.org/t/exporting-a-surface/38040)

<div class="topic-metadata">

**Author:** [@Bigorneau](https://discourse.julialang.org/u/Bigorneau)\
**Replies:** 4\
**Last updated:** [April 22, 2020, 9:21pm UTC](https://discourse.julialang.org/t/exporting-a-surface/38040 "2020-04-22T21:21:34Z")

</div>

Hi, I could not find any resources online about exporting a surface as a mesh in Julia. To be more precise, suppose at the end of some computation I have a surface only known as the three matrices X,Y,Z. I can visualize…

---

## [Creating \*.dll with packageCompiler](https://discourse.julialang.org/t/creating-dll-with-packagecompiler/37811)

<div class="topic-metadata">

**Author:** [@Owolf](https://discourse.julialang.org/u/Owolf)\
**Replies:** 2\
**Last updated:** [April 22, 2020, 7:13pm UTC](https://discourse.julialang.org/t/creating-dll-with-packagecompiler/37811 "2020-04-22T19:13:54Z")

</div>

Hello, I would like to create \*.dll file from my \*.jl code. Before I had packageCompiler version 0.6.4 and it works just perfectly. I only did something like this: using PackageCompiler build\_shared\_lib("test.jl", "te…

---

## [JLD/JLD2 and HDF5](https://discourse.julialang.org/t/jld-jld2-and-hdf5/38031)

<div class="topic-metadata">

**Author:** [@themadprogramer](https://discourse.julialang.org/u/themadprogramer)\
**Replies:** 1\
**Last updated:** [April 22, 2020, 5:24pm UTC](https://discourse.julialang.org/t/jld-jld2-and-hdf5/38031 "2020-04-22T17:24:24Z")

</div>

Hello, I noticed a few libraries were using the .jld2 extension which led me to discover https://github.com/JuliaIO/JLD2.jl which seems to be a native Julia implementation of HDF5. Now I just want to ask, are .h5 files…

---

## [Efficiently Store and Access Large 3-Dimensional Arrays](https://discourse.julialang.org/t/efficiently-store-and-access-large-3-dimensional-arrays/37656)

<div class="topic-metadata">

**Author:** [@Dr.Merkwuedigliebe](https://discourse.julialang.org/u/Dr.Merkwuedigliebe)\
**Replies:** 12\
**Last updated:** [April 22, 2020, 5:19pm UTC](https://discourse.julialang.org/t/efficiently-store-and-access-large-3-dimensional-arrays/37656 "2020-04-22T17:19:19Z")

</div>

I am working on a simulation that stores and remove values (some form of float) at various points in a 3-dimensional space, represented by an array with a size of ~(2e4 x 4e4 x 1e2). Specifically, it records the property…

---

## [My my factorial functions return 1 for any negative value](https://discourse.julialang.org/t/my-my-factorial-functions-return-1-for-any-negative-value/38035)

<div class="topic-metadata">

**Author:** [@A.U.M](https://discourse.julialang.org/u/A.U.M)\
**Replies:** 1\
**Last updated:** [April 22, 2020, 4:58pm UTC](https://discourse.julialang.org/t/my-my-factorial-functions-return-1-for-any-negative-value/38035 "2020-04-22T16:58:36Z")

</div>

Why my Factorial functions return 1 for any negative value always? my\_factorial(n::Integer)::BigInt = reduce(\*, BigInt(1):BigInt(n))

---

## [Creating an environment to use specific versions of packages, Julia uses most current anyway](https://discourse.julialang.org/t/creating-an-environment-to-use-specific-versions-of-packages-julia-uses-most-current-anyway/38021)

<div class="topic-metadata">

**Author:** [@cby](https://discourse.julialang.org/u/cby)\
**Replies:** 2\
**Last updated:** [April 22, 2020, 4:21pm UTC](https://discourse.julialang.org/t/creating-an-environment-to-use-specific-versions-of-packages-julia-uses-most-current-anyway/38021 "2020-04-22T16:21:15Z")

</div>

I am trying to create an environment as shown here to specifically use an older version of a package (JuMPv.19), which seems to be successful. (JuMPv.19) pkg\> st Status \`~/JuliaEnvs/JuMPv.19/Project.toml\` \[2e9cd046\] G…

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

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