# General Usage

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

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

**Page:** 801

---

## [Replicating behavior of scipy.ndimate.gaussian\_filter](https://discourse.julialang.org/t/replicating-behavior-of-scipy-ndimate-gaussian-filter/32809)

<div class="topic-metadata">

**Author:** [@bensetterholm](https://discourse.julialang.org/u/bensetterholm)\
**Replies:** 3\
**Last updated:** [December 31, 2019, 4:49pm UTC](https://discourse.julialang.org/t/replicating-behavior-of-scipy-ndimate-gaussian-filter/32809 "2019-12-31T16:49:12Z")

</div>

I am trying to convert an old Python script to Julia. At one point, the script makes a call to scipy.ndimage.gaussian\_filter, for which I presume the Julia equivalent should be ImageFiltering.imfilter with Kernel.gaussia…

---

## [How can I make this more elegant/performant?](https://discourse.julialang.org/t/how-can-i-make-this-more-elegant-performant/32797)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 8\
**Last updated:** [December 31, 2019, 12:55pm UTC](https://discourse.julialang.org/t/how-can-i-make-this-more-elegant-performant/32797 "2019-12-31T12:55:08Z")

</div>

Based on past experience, I have a feeling that I’ve horrendously over-engineered a solution to what seems like a simple problem. I have a vector of codes (numbers represented as strings) that I need to ‘collapse’ down. …

---

## [What is the agreed abstraction for the "size" of finite collections?](https://discourse.julialang.org/t/what-is-the-agreed-abstraction-for-the-size-of-finite-collections/32757)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 38\
**Last updated:** [December 31, 2019, 12:42pm UTC](https://discourse.julialang.org/t/what-is-the-agreed-abstraction-for-the-size-of-finite-collections/32757 "2019-12-31T12:42:27Z")

</div>

Suppose I have a type that is a collection of samples (e.g. DataFrame). Unlike a simple Vector for which the name length can be used to retrieve the number of elements, my type doesn’t have the function length, but inste…

---

## [Confidence interval with Plots and pgfplots()](https://discourse.julialang.org/t/confidence-interval-with-plots-and-pgfplots/31440)

<div class="topic-metadata">

**Author:** [@juliauser](https://discourse.julialang.org/u/juliauser)\
**Replies:** 35\
**Last updated:** [December 31, 2019, 11:31am UTC](https://discourse.julialang.org/t/confidence-interval-with-plots-and-pgfplots/31440 "2019-12-31T11:31:54Z")

</div>

Hi, I would like to run this type of code using Plots pgfplots() aa = rand(10) bb = rand(10) cc = rand(10) conf = \[aa-cc bb-cc\] p = plot(collect(1:10),cc) plot!(cc,ribbon=conf) This code works well is I replace pgfpl…

---

## [How to sample a Data frame](https://discourse.julialang.org/t/how-to-sample-a-data-frame/32791)

<div class="topic-metadata">

**Author:** [@imrankhan\_juliaLang](https://discourse.julialang.org/u/imrankhan_juliaLang)\
**Replies:** 10\
**Last updated:** [December 31, 2019, 5:08am UTC](https://discourse.julialang.org/t/how-to-sample-a-data-frame/32791 "2019-12-31T05:08:57Z")

</div>

How can i sampling Data Frame? Like python data.sample() method NB: replace must need

---

## [Memory allocation on multiple return values](https://discourse.julialang.org/t/memory-allocation-on-multiple-return-values/32805)

<div class="topic-metadata">

**Author:** [@lucas711642](https://discourse.julialang.org/u/lucas711642)\
**Replies:** 3\
**Last updated:** [December 31, 2019, 4:01am UTC](https://discourse.julialang.org/t/memory-allocation-on-multiple-return-values/32805 "2019-12-31T04:01:56Z")

</div>

Is there any way to avoid allocations on functions that return multiple values, when some of these values are mutable? For example: julia\> x = \[0\]; julia\> fun1(x) = @time((x, 1)); julia\> fun2(x) = (fun1(x); nothing); j…

---

## [Finding uses of a method?](https://discourse.julialang.org/t/finding-uses-of-a-method/32729)

<div class="topic-metadata">

**Author:** [@gcv](https://discourse.julialang.org/u/gcv)\
**Replies:** 3\
**Last updated:** [December 30, 2019, 7:23pm UTC](https://discourse.julialang.org/t/finding-uses-of-a-method/32729 "2019-12-30T19:23:36Z")

</div>

Is there a way to interrogate the Julia runtime and determine places where a method has been called from? (Context: Emacs development environment for Julia. This is for implementing search by cross-references.)

---

## [Can not access geqrf!() function in LinearAlgebra Standard Library Package Julia 1.3.0](https://discourse.julialang.org/t/can-not-access-geqrf-function-in-linearalgebra-standard-library-package-julia-1-3-0/32796)

<div class="topic-metadata">

**Author:** [@dataDiver](https://discourse.julialang.org/u/dataDiver)\
**Replies:** 3\
**Last updated:** [December 30, 2019, 3:03pm UTC](https://discourse.julialang.org/t/can-not-access-geqrf-function-in-linearalgebra-standard-library-package-julia-1-3-0/32796 "2019-12-30T15:03:24Z")

</div>

Trying to run geqrf!() function from the manual using LinearAlgebra Q = rand(10, 5); tau = zeros(5) geqrf!(Q, tau) # ERROR: UndefVarError: geqrf! not defined

---

## [Keeping Julia alive while running a web server in the background](https://discourse.julialang.org/t/keeping-julia-alive-while-running-a-web-server-in-the-background/8422)

<div class="topic-metadata">

**Author:** [@NickNack](https://discourse.julialang.org/u/NickNack)\
**Replies:** 10\
**Last updated:** [December 30, 2019, 2:48pm UTC](https://discourse.julialang.org/t/keeping-julia-alive-while-running-a-web-server-in-the-background/8422 "2019-12-30T14:48:18Z")

</div>

I’m using Mux.jl to run a web server. My code is in a module with the following structure: module MyApp using Mux # all app functions here function startserver() # setup routes here (using the functions above) …

---

## [Update variable in logged message without printing a new line?](https://discourse.julialang.org/t/update-variable-in-logged-message-without-printing-a-new-line/32755)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 5\
**Last updated:** [December 30, 2019, 12:49am UTC](https://discourse.julialang.org/t/update-variable-in-logged-message-without-printing-a-new-line/32755 "2019-12-30T00:49:43Z")

</div>

I’m wondering if it’s possible to update a logged message without printing a new line. I’d like to log some information to the console on each iteration of a loop but, rather than printing a new @info statement on each i…

---

## [\-1^(1/2) is Complex(-1^(1/2)) ==-1.0 + 0.0im?](https://discourse.julialang.org/t/1-1-2-is-complex-1-1-2-1-0-0-0im/32776)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 8\
**Last updated:** [December 29, 2019, 8:18pm UTC](https://discourse.julialang.org/t/1-1-2-is-complex-1-1-2-1-0-0-0im/32776 "2019-12-29T20:18:13Z")

</div>

Why Complex(-1^(1/2))== -1.0 + 0.0im ??? Version 1.3.0-rc4.1 (2019-10-15) julia\> Complex(-1^(.5)) -1.0 + 0.0im julia\> sqrt(Complex(-1)) 0.0 + 1.0im julia\> Complex(-1^(1/2)) -1.0 + 0.0im julia\> 4^(1/2) 2.0 julia\> 9…

---

## [Cannot install SymEngine](https://discourse.julialang.org/t/cannot-install-symengine/32753)

<div class="topic-metadata">

**Author:** [@s\_1291](https://discourse.julialang.org/u/s_1291)\
**Replies:** 13\
**Last updated:** [December 29, 2019, 8:11pm UTC](https://discourse.julialang.org/t/cannot-install-symengine/32753 "2019-12-29T20:11:19Z")

</div>

Hello, I’ve encountered some technical issues while trying to install some packages in Julia 1.3.0 in Windows 7: C:\\Windows\\system32\>julia \_ \_ \_ \_(\_)\_ | Documentation: https://docs.julialan…

---

## [How to debug slow memory leak from threads?](https://discourse.julialang.org/t/how-to-debug-slow-memory-leak-from-threads/32784)

<div class="topic-metadata">

**Author:** [@robsmith11](https://discourse.julialang.org/u/robsmith11)\
**Replies:** 0\
**Last updated:** [December 29, 2019, 6:26pm UTC](https://discourse.julialang.org/t/how-to-debug-slow-memory-leak-from-threads/32784 "2019-12-29T18:26:38Z")

</div>

I’m running a calculation about 10 million times with different parameter sets. The input data is 50MB and the output of all 10 million runs adds up to 1GB. When I use multiple threads with 8 cores, I get a nearly perf…

---

## [Julia 1.2.0 and Unicode character in Windows 10](https://discourse.julialang.org/t/julia-1-2-0-and-unicode-character-in-windows-10/29697)

<div class="topic-metadata">

**Author:** [@Giovanni\_Di\_Stefano](https://discourse.julialang.org/u/Giovanni_Di_Stefano)\
**Replies:** 9\
**Last updated:** [December 29, 2019, 4:24pm UTC](https://discourse.julialang.org/t/julia-1-2-0-and-unicode-character-in-windows-10/29697 "2019-12-29T16:24:21Z")

</div>

Hello! I installed Julia 1.2.0 on Windows 10, but when I type :turtle: , the turtle is not displayed, why?

---

## [How to contribute to existing package](https://discourse.julialang.org/t/how-to-contribute-to-existing-package/32749)

<div class="topic-metadata">

**Author:** [@yuxi.liu](https://discourse.julialang.org/u/yuxi.liu)\
**Replies:** 6\
**Last updated:** [December 29, 2019, 11:22am UTC](https://discourse.julialang.org/t/how-to-contribute-to-existing-package/32749 "2019-12-29T11:22:48Z")

</div>

How to develop existing packages? If I want to develop Example.jl, should I use pkg and pkg\> develop --local Example or fork the repo and then clone to desktop? If so, how do I load my local copy of package to Julia? H…

---

## [Tree view Interact.jl](https://discourse.julialang.org/t/tree-view-interact-jl/32778)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 0\
**Last updated:** [December 29, 2019, 9:26am UTC](https://discourse.julialang.org/t/tree-view-interact-jl/32778 "2019-12-29T09:26:24Z")

</div>

Hi All, I would like to ask, if anyone has created a tree view (something like this How To Create a Tree View ) for Interact.jl. I would like to interactively show the schema of jsons in my package GitHub - CTUAvastLab/…

---

## [Inference extremely slow for tiny program in Julia 0.6.4](https://discourse.julialang.org/t/inference-extremely-slow-for-tiny-program-in-julia-0-6-4/13854)

<div class="topic-metadata">

**Author:** [@bennedich](https://discourse.julialang.org/u/bennedich)\
**Replies:** 8\
**Last updated:** [December 29, 2019, 2:26am UTC](https://discourse.julialang.org/t/inference-extremely-slow-for-tiny-program-in-julia-0-6-4/13854 "2019-12-29T02:26:01Z")

</div>

The following code runs very slowly in Julia 0.6.4 (~3 seconds), but quickly in Julia 0.7.0. Any idea what’s going on? function fun2() A .\*= A ./ y B .\*= B ./ y C .\*= C ./ y end function fun1() x = 1 …

---

## [Legend entries ordered horizontally with pyplot()](https://discourse.julialang.org/t/legend-entries-ordered-horizontally-with-pyplot/32770)

<div class="topic-metadata">

**Author:** [@juliauser](https://discourse.julialang.org/u/juliauser)\
**Replies:** 1\
**Last updated:** [December 29, 2019, 1:58am UTC](https://discourse.julialang.org/t/legend-entries-ordered-horizontally-with-pyplot/32770 "2019-12-29T01:58:18Z")

</div>

Hi, Is there a way to list the legend entries horizontally, next to each other, instead of one under each other? Thanks

---

## [(fast) sparse solve on GPU](https://discourse.julialang.org/t/fast-sparse-solve-on-gpu/32297)

<div class="topic-metadata">

**Author:** [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Replies:** 7\
**Last updated:** [December 28, 2019, 9:25pm UTC](https://discourse.julialang.org/t/fast-sparse-solve-on-gpu/32297 "2019-12-28T21:25:30Z")

</div>

Hi, I would like to solve sparse linear systems on the GPU. But when I try the tests example of CuArrays, the GPU version seems way slower than the CPU one. Is it expected? Additionnally, say I have a LU factorisation …

---

## [Authenticate not working](https://discourse.julialang.org/t/authenticate-not-working/32762)

<div class="topic-metadata">

**Author:** [@Varghese](https://discourse.julialang.org/u/Varghese)\
**Replies:** 1\
**Last updated:** [December 28, 2019, 8:43pm UTC](https://discourse.julialang.org/t/authenticate-not-working/32762 "2019-12-28T20:43:10Z")

</div>

I installed juliapro. pressed enter. typed \]. typed up. html pane is blank. but repl shows please authenticate. what is wrong? how do i get the htmlpane to show sign in options

---

## [Installed ClusterManagers Package Code (slurm.jl) Inconsistent with Latest Repository Version (v0.3.2)](https://discourse.julialang.org/t/installed-clustermanagers-package-code-slurm-jl-inconsistent-with-latest-repository-version-v0-3-2/32765)

<div class="topic-metadata">

**Author:** [@littleK](https://discourse.julialang.org/u/littleK)\
**Replies:** 0\
**Last updated:** [December 28, 2019, 4:33pm UTC](https://discourse.julialang.org/t/installed-clustermanagers-package-code-slurm-jl-inconsistent-with-latest-repository-version-v0-3-2/32765 "2019-12-28T16:33:26Z")

</div>

I’m testing a few different “Hello World” examples using the ClusterManagers package for a small SLURM cluster, and it appears that my ClusterManagers slurm.jl file is outdated, despite showing the most recent version. T…

---

## [Plots.jl title greek letter error](https://discourse.julialang.org/t/plots-jl-title-greek-letter-error/32758)

<div class="topic-metadata">

**Author:** [@yuxi.liu](https://discourse.julialang.org/u/yuxi.liu)\
**Replies:** 1\
**Last updated:** [December 28, 2019, 4:24pm UTC](https://discourse.julialang.org/t/plots-jl-title-greek-letter-error/32758 "2019-12-28T16:24:58Z")

</div>

using Plots plot(1,1, title="ρ") gives It turns out to be a problem with unicode, and can be worked around with LaTeX input. plot(1,1, title="\\\\rho")

---

## [How do I draw a 3d square in Plots.jl?](https://discourse.julialang.org/t/how-do-i-draw-a-3d-square-in-plots-jl/32756)

<div class="topic-metadata">

**Author:** [@yuxi.liu](https://discourse.julialang.org/u/yuxi.liu)\
**Replies:** 0\
**Last updated:** [December 28, 2019, 2:28pm UTC](https://discourse.julialang.org/t/how-do-i-draw-a-3d-square-in-plots-jl/32756 "2019-12-28T14:28:00Z")

</div>

I want to draw a square in 3d space defined by the points \[ -20 0 0; -20 0 40; 20 0 0; 20 0 40\] How to do that?

---

## [Does there exist a comprehensive manual for an overview of the functions and features provided in Gtk.jl?](https://discourse.julialang.org/t/does-there-exist-a-comprehensive-manual-for-an-overview-of-the-functions-and-features-provided-in-gtk-jl/28119)

<div class="topic-metadata">

**Author:** [@mantzaris](https://discourse.julialang.org/u/mantzaris)\
**Replies:** 9\
**Last updated:** [December 28, 2019, 1:57pm UTC](https://discourse.julialang.org/t/does-there-exist-a-comprehensive-manual-for-an-overview-of-the-functions-and-features-provided-in-gtk-jl/28119 "2019-12-28T13:57:20Z")

</div>

I am looking at examples of code developing UIs with Gtk.jl, but occasionally (if not frequently) encounter functions that I do not know what they actually do. If I run the examples, I can then piece together what I beli…

---

## [How to tell if a Task is blocked?](https://discourse.julialang.org/t/how-to-tell-if-a-task-is-blocked/32392)

<div class="topic-metadata">

**Author:** [@hwjsnc](https://discourse.julialang.org/u/hwjsnc)\
**Replies:** 1\
**Last updated:** [December 28, 2019, 1:12pm UTC](https://discourse.julialang.org/t/how-to-tell-if-a-task-is-blocked/32392 "2019-12-28T13:12:47Z")

</div>

I have a Task executed with @async. This task writes to a Channel multiple times (it is not known exactly how often), then reads from another Channel once. This should repeat until some condition is met. The main thread …

---

## [Type-stable Array of NamedTuples](https://discourse.julialang.org/t/type-stable-array-of-namedtuples/32743)

<div class="topic-metadata">

**Author:** [@robsmith11](https://discourse.julialang.org/u/robsmith11)\
**Replies:** 12\
**Last updated:** [December 27, 2019, 9:21pm UTC](https://discourse.julialang.org/t/type-stable-array-of-namedtuples/32743 "2019-12-27T21:21:57Z")

</div>

I often want to do the following for a large n where I perform some calculations and return a tuple of values with the result of each iteration: function f(n::Int) v = Vector() for i in 1:n ... push!(v, (a=…

---

## [Plot xlabel and ylabel fontsize and fontweight](https://discourse.julialang.org/t/plot-xlabel-and-ylabel-fontsize-and-fontweight/32739)

<div class="topic-metadata">

**Author:** [@imrankhan\_juliaLang](https://discourse.julialang.org/u/imrankhan_juliaLang)\
**Replies:** 2\
**Last updated:** [December 27, 2019, 9:16pm UTC](https://discourse.julialang.org/t/plot-xlabel-and-ylabel-fontsize-and-fontweight/32739 "2019-12-27T21:16:38Z")

</div>

how can i change fontsize and fontweight in xlabel and ylabel

---

## [Help implementing the Elo Rating System in Julia?](https://discourse.julialang.org/t/help-implementing-the-elo-rating-system-in-julia/32721)

<div class="topic-metadata">

**Author:** [@PseudoCodeNerd](https://discourse.julialang.org/u/PseudoCodeNerd)\
**Replies:** 3\
**Last updated:** [December 26, 2019, 8:49pm UTC](https://discourse.julialang.org/t/help-implementing-the-elo-rating-system-in-julia/32721 "2019-12-26T20:49:43Z")

</div>

Hello There ! I recently thought out to implement the Elo Rating System in Julia. Elo rating system - Wikipedia More information about this. The function should take an array of pre-ratings and returns an array contai…

---

## [Changing the lower bound of a JuMp Model](https://discourse.julialang.org/t/changing-the-lower-bound-of-a-jump-model/32395)

<div class="topic-metadata">

**Author:** [@marouane1994](https://discourse.julialang.org/u/marouane1994)\
**Replies:** 4\
**Last updated:** [December 26, 2019, 6:39pm UTC](https://discourse.julialang.org/t/changing-the-lower-bound-of-a-jump-model/32395 "2019-12-26T18:39:46Z")

</div>

i want to change the lower bound of a model from a zero array to take the value of the elements of another array here’s the function that i’m having using JuMP using Clp function scan\_maker(A) m = JuMP.Model(solver=…

---

## [Julia 1.0.2 cannot find libraries under vglrun](https://discourse.julialang.org/t/julia-1-0-2-cannot-find-libraries-under-vglrun/17977)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 1\
**Last updated:** [December 26, 2019, 5:25pm UTC](https://discourse.julialang.org/t/julia-1-0-2-cannot-find-libraries-under-vglrun/17977 "2019-12-26T17:25:34Z")

</div>

When I try to start julia in a virtual GL environment (needed for Makie) julia 1.0 fails, even though julia 0.7 and 0.6 work. It fails with the following failure: ufechner@TUD277255:~$ vglrun julia1 WARNING: Error durin…

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

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