# General Usage

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

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

**Page:** 770

---

## [Printing a Julia source with unicode from Atom](https://discourse.julialang.org/t/printing-a-julia-source-with-unicode-from-atom/36869)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 10\
**Last updated:** [April 2, 2020, 4:54pm UTC](https://discourse.julialang.org/t/printing-a-julia-source-with-unicode-from-atom/36869 "2020-04-02T16:54:58Z")

</div>

Is there an accepted way to print a Julia source file keeping the Unicode intact? Thanks.

---

## [How to deal with isprobvec(p) error?](https://discourse.julialang.org/t/how-to-deal-with-isprobvec-p-error/36911)

<div class="topic-metadata">

**Author:** [@DeepQ](https://discourse.julialang.org/u/DeepQ)\
**Replies:** 0\
**Last updated:** [April 2, 2020, 4:39pm UTC](https://discourse.julialang.org/t/how-to-deal-with-isprobvec-p-error/36911 "2020-04-02T16:39:06Z")

</div>

I’ve written a neural network using Knet library and I am trying to use the normalized output of the neural network as a density function. The problem is when I use ReLU as the activation function of the neural net and a…

---

## [Running small functions bundled in an outer function taking twice the time of running them separately](https://discourse.julialang.org/t/running-small-functions-bundled-in-an-outer-function-taking-twice-the-time-of-running-them-separately/36894)

<div class="topic-metadata">

**Author:** [@atrabattoni](https://discourse.julialang.org/u/atrabattoni)\
**Replies:** 7\
**Last updated:** [April 2, 2020, 4:06pm UTC](https://discourse.julialang.org/t/running-small-functions-bundled-in-an-outer-function-taking-twice-the-time-of-running-them-separately/36894 "2020-04-02T16:06:39Z")

</div>

I’m working on optimizing some code. I isolated small functions, I benchmarked them and I was happy with their speed. But when I bundle those functions in an outer function, the timing almost twice the sum of the isolate…

---

## [API/traits for chunked out-of-core arrays?](https://discourse.julialang.org/t/api-traits-for-chunked-out-of-core-arrays/36873)

<div class="topic-metadata">

**Author:** [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Replies:** 6\
**Last updated:** [April 2, 2020, 3:23pm UTC](https://discourse.julialang.org/t/api-traits-for-chunked-out-of-core-arrays/36873 "2020-04-02T15:23:23Z")

</div>

Do we have some API/traits for out-of core arrays (e.g. on-disk arrays), especially if access to the array data is most efficient in a certain block/chunk size?

---

## [Cell list algorithm is slower than double for loop](https://discourse.julialang.org/t/cell-list-algorithm-is-slower-than-double-for-loop/36621)

<div class="topic-metadata">

**Author:** [@Maize](https://discourse.julialang.org/u/Maize)\
**Replies:** 18\
**Last updated:** [April 2, 2020, 1:58pm UTC](https://discourse.julialang.org/t/cell-list-algorithm-is-slower-than-double-for-loop/36621 "2020-04-02T13:58:44Z")

</div>

I want to solve the fixed radius near neighbor problem, i.e., for a given point set in 2D, find all the point pairs whose length is less than a given radius r. I use the cell list algorithm, see Cell List algorithm and…

---

## [Fast derivatives for tensor expressions using ForwardDiff](https://discourse.julialang.org/t/fast-derivatives-for-tensor-expressions-using-forwarddiff/36840)

<div class="topic-metadata">

**Author:** [@rrhiemstra](https://discourse.julialang.org/u/rrhiemstra)\
**Replies:** 1\
**Last updated:** [April 2, 2020, 9:03am UTC](https://discourse.julialang.org/t/fast-derivatives-for-tensor-expressions-using-forwarddiff/36840 "2020-04-02T09:03:23Z")

</div>

I want to evaluate and differentiate functions on a grid of points that have an underlying tensor structure g(x,y) = Lᵢ(xₖ) Aᵢⱼ Lⱼ(yₗ) Here x = \[x₁, …, xₙ\] and y = \[x₁, …, xₙ\] Here A is a n x n Matrix of coefficien…

---

## [Use value of a field of a structure to define other fields of the structure](https://discourse.julialang.org/t/use-value-of-a-field-of-a-structure-to-define-other-fields-of-the-structure/36887)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 1\
**Last updated:** [April 2, 2020, 7:35am UTC](https://discourse.julialang.org/t/use-value-of-a-field-of-a-structure-to-define-other-fields-of-the-structure/36887 "2020-04-02T07:35:40Z")

</div>

Hello everyone, I would like to create a structure with an integer p and a Static vector A whose size depends on p. If p==0 then A will contain 2 Float64 elements otherwise A will contain p+1 Float64 elements. For a st…

---

## [I wanted to plot Graphs in Jullia (IntellijIdea)](https://discourse.julialang.org/t/i-wanted-to-plot-graphs-in-jullia-intellijidea/36781)

<div class="topic-metadata">

**Author:** [@Neeraj\_Verma\_ASETRAI](https://discourse.julialang.org/u/Neeraj_Verma_ASETRAI)\
**Replies:** 8\
**Last updated:** [April 2, 2020, 6:04am UTC](https://discourse.julialang.org/t/i-wanted-to-plot-graphs-in-jullia-intellijidea/36781 "2020-04-02T06:04:09Z")

</div>

I wanted to plot Graphs in Jullia I am using IntellijIdea which packages should i use Please describe step by step guide I am getting error with Plots “precompile PlotTheme Error”

---

## [Is the a function that essentially does foldr but witha stopping condition?](https://discourse.julialang.org/t/is-the-a-function-that-essentially-does-foldr-but-witha-stopping-condition/36875)

<div class="topic-metadata">

**Author:** [@jtaylor306](https://discourse.julialang.org/u/jtaylor306)\
**Replies:** 4\
**Last updated:** [April 2, 2020, 2:40am UTC](https://discourse.julialang.org/t/is-the-a-function-that-essentially-does-foldr-but-witha-stopping-condition/36875 "2020-04-02T02:40:17Z")

</div>

What I essentially want to do is keep folding an array from left to right with an operator, and then stopping what I hit a total so some number X. for example: foldl(+,\[1,2,3,4,5,6\],10) I expect the results to be 10,…

---

## [How to define a variable function in advance](https://discourse.julialang.org/t/how-to-define-a-variable-function-in-advance/36609)

<div class="topic-metadata">

**Author:** [@dmetivie](https://discourse.julialang.org/u/dmetivie)\
**Replies:** 8\
**Last updated:** [April 2, 2020, 1:58am UTC](https://discourse.julialang.org/t/how-to-define-a-variable-function-in-advance/36609 "2020-04-02T01:58:07Z")

</div>

I want to define families of polynomial functions for which I can compute the coefficients in advance. For example, (here I stop at degree 3) function poly1(n::Int64, x) if n == 0 return 1. elseif n == …

---

## [Julia Markdown: Error converting document to pdf. Try running latex manually](https://discourse.julialang.org/t/julia-markdown-error-converting-document-to-pdf-try-running-latex-manually/12342)

<div class="topic-metadata">

**Author:** [@mvcavalcanti](https://discourse.julialang.org/u/mvcavalcanti)\
**Replies:** 2\
**Last updated:** [April 2, 2020, 12:53am UTC](https://discourse.julialang.org/t/julia-markdown-error-converting-document-to-pdf-try-running-latex-manually/12342 "2020-04-02T00:53:30Z")

</div>

I have been using Weave to generate PDFs from Julia markdown, but it is not working. If I run using Weave weave(“gadfly\_md\_sample.jmd”; doctype=“md2pdf”, latex\_cmd=“pdflatex”) I get the following warning: WARNING: E…

---

## [Polar plot problem in Plots.jl with the PlotlyJS backend](https://discourse.julialang.org/t/polar-plot-problem-in-plots-jl-with-the-plotlyjs-backend/36863)

<div class="topic-metadata">

**Author:** [@wrighteap](https://discourse.julialang.org/u/wrighteap)\
**Replies:** 0\
**Last updated:** [April 1, 2020, 6:18pm UTC](https://discourse.julialang.org/t/polar-plot-problem-in-plots-jl-with-the-plotlyjs-backend/36863 "2020-04-01T18:18:05Z")

</div>

Hello, I am having some trouble (see figure below) with polar plots using the plotlyjs backend in the plots.jl package in jupyterlab and juno. I had a look around (google for the most part) and could not find anyone wit…

---

## [Store a sum of parameterized scalar functions](https://discourse.julialang.org/t/store-a-sum-of-parameterized-scalar-functions/36815)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 13\
**Last updated:** [April 1, 2020, 9:00pm UTC](https://discourse.julialang.org/t/store-a-sum-of-parameterized-scalar-functions/36815 "2020-04-01T21:00:40Z")

</div>

Hello everyone, I need to compute the same sum of scalar functions (constant, linear, Gaussian kernel…) for a large number of different values. I would like to create a structure that will hold the sum of these functio…

---

## [Strange behavior with list comprehensions using Iterators.Stateful](https://discourse.julialang.org/t/strange-behavior-with-list-comprehensions-using-iterators-stateful/29715)

<div class="topic-metadata">

**Author:** [@altre](https://discourse.julialang.org/u/altre)\
**Replies:** 3\
**Last updated:** [April 1, 2020, 8:47pm UTC](https://discourse.julialang.org/t/strange-behavior-with-list-comprehensions-using-iterators-stateful/29715 "2020-04-01T20:47:08Z")

</div>

I’m having trouble to understand the following behavior of Iterators.Stateful. This is as expected julia\> for a in Iterators.Stateful(\[1,2,3\]) print(a) end 123 But this seems strange: julia\> \[a f…

---

## [Using Cassette through \`eval\`](https://discourse.julialang.org/t/using-cassette-through-eval/36519)

<div class="topic-metadata">

**Author:** [@ckfinite](https://discourse.julialang.org/u/ckfinite)\
**Replies:** 1\
**Last updated:** [April 1, 2020, 4:26pm UTC](https://discourse.julialang.org/t/using-cassette-through-eval/36519 "2020-04-01T16:26:19Z")

</div>

I’m working on developing a dynamic analysis system that needs to dynamically track function definitions and invocations, including those made in eval statements. I’ve, so far, been using Cassette to track function invoc…

---

## [Allocations when constructing a matrix from columns](https://discourse.julialang.org/t/allocations-when-constructing-a-matrix-from-columns/36795)

<div class="topic-metadata">

**Author:** [@mht](https://discourse.julialang.org/u/mht)\
**Replies:** 35\
**Last updated:** [April 1, 2020, 2:12pm UTC](https://discourse.julialang.org/t/allocations-when-constructing-a-matrix-from-columns/36795 "2020-04-01T14:12:51Z")

</div>

Hey all! I’m constructing a matrix from another matrix like this: shapematrix(xs) = \[xs\[:,1\].-xs\[:,4\] xs\[:,2\].-xs\[:,4\] xs\[:,3\].-xs\[:,4\]\] This is somewhat in an inner loop of my program, and I would like to reduce th…

---

## [Is it a bug for the power function?](https://discourse.julialang.org/t/is-it-a-bug-for-the-power-function/36833)

<div class="topic-metadata">

**Author:** [@gangchern](https://discourse.julialang.org/u/gangchern)\
**Replies:** 9\
**Last updated:** [April 1, 2020, 12:27pm UTC](https://discourse.julialang.org/t/is-it-a-bug-for-the-power-function/36833 "2020-04-01T12:27:23Z")

</div>

The following code seems not works Complex(-0.5)^(0.2) It throw a error.

---

## [Install a specific commit for unregistered package?](https://discourse.julialang.org/t/install-a-specific-commit-for-unregistered-package/8468)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 8\
**Last updated:** [April 1, 2020, 9:07am UTC](https://discourse.julialang.org/t/install-a-specific-commit-for-unregistered-package/8468 "2020-04-01T09:07:54Z")

</div>

I’m trying to install a specific commit of a unregistered package. I tried with Pkg.pin but that’s only available with registered packages; and Pkg.clone does not have any method for that. Is it possible to install a spe…

---

## [Reel.jl Package with Windows](https://discourse.julialang.org/t/reel-jl-package-with-windows/36827)

<div class="topic-metadata">

**Author:** [@AmburoseSekar](https://discourse.julialang.org/u/AmburoseSekar)\
**Replies:** 2\
**Last updated:** [April 1, 2020, 7:57am UTC](https://discourse.julialang.org/t/reel-jl-package-with-windows/36827 "2020-04-01T07:57:24Z")

</div>

Hi, I’m newbie to Julia, i have use Reel.jl package for animation. The GitHub Reference code i have used. it’s create images default in text/html format. But unfortunately ffmpeg doesn’t support html to GIF format but …

---

## [How to plot a 3D sufface graph from a 3D array of data](https://discourse.julialang.org/t/how-to-plot-a-3d-sufface-graph-from-a-3d-array-of-data/36832)

<div class="topic-metadata">

**Author:** [@Ujku\_KU](https://discourse.julialang.org/u/Ujku_KU)\
**Replies:** 0\
**Last updated:** [April 1, 2020, 7:51am UTC](https://discourse.julialang.org/t/how-to-plot-a-3d-sufface-graph-from-a-3d-array-of-data/36832 "2020-04-01T07:51:30Z")

</div>

Hi guys, my question is: how to plot a 3D surface graph using data from a 3D array. For example in my case I have a set of distances and a set of features. I use for my experiments different number of features and differ…

---

## [Update bands of a CSC Matrix](https://discourse.julialang.org/t/update-bands-of-a-csc-matrix/36800)

<div class="topic-metadata">

**Author:** [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Replies:** 0\
**Last updated:** [March 31, 2020, 3:25pm UTC](https://discourse.julialang.org/t/update-bands-of-a-csc-matrix/36800 "2020-03-31T15:25:26Z")

</div>

Hi, I would like to update inplace a CSC sparse Matrix A which has several bands like A = spdiagm( 0 =\> ones(10), 1=\> ones(10-1)) What I would like to do is to change the values of the band 1 (for example) by modifyin…

---

## [Publishing an updated package](https://discourse.julialang.org/t/publishing-an-updated-package/35768)

<div class="topic-metadata">

**Author:** [@hros](https://discourse.julialang.org/u/hros)\
**Replies:** 3\
**Last updated:** [April 1, 2020, 12:22am UTC](https://discourse.julialang.org/t/publishing-an-updated-package/35768 "2020-04-01T00:22:10Z")

</div>

A few months ago, I have published a package (a wrapper of a C library). Recently, the C library was updated and I decided to make use of the arifacts/jll. My old implementation used BinaryProvider and CI scripts: trav…

---

## [SparseMatrix is very slow](https://discourse.julialang.org/t/sparsematrix-is-very-slow/36809)

<div class="topic-metadata">

**Author:** [@Tong\_Zhou](https://discourse.julialang.org/u/Tong_Zhou)\
**Replies:** 9\
**Last updated:** [March 31, 2020, 9:00pm UTC](https://discourse.julialang.org/t/sparsematrix-is-very-slow/36809 "2020-03-31T21:00:16Z")

</div>

Hi I have the following simple code: import SparseArrays function func0(K::Array{Float64,2}, M::Array{Float64,2}, r::Array{Float64,2}, x::Array{Float64,2}, row::Array{Int32,1}, col::Array{Int32,1}, data::Array{Float64,…

---

## [Constructing a block tri-diagonal matrix](https://discourse.julialang.org/t/constructing-a-block-tri-diagonal-matrix/36704)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 7\
**Last updated:** [March 31, 2020, 8:16pm UTC](https://discourse.julialang.org/t/constructing-a-block-tri-diagonal-matrix/36704 "2020-03-31T20:16:01Z")

</div>

I need to construct a matrix of this form: where A1, A2, ..., A\_M are given (rectangular) matrices, and the zeros are blocks of appropriate sizes. How can I do this in Julia, with as less code as possible? Maybe ther…

---

## [Guix importer](https://discourse.julialang.org/t/guix-importer/36802)

<div class="topic-metadata">

**Author:** [@bijang](https://discourse.julialang.org/u/bijang)\
**Replies:** 0\
**Last updated:** [March 31, 2020, 4:42pm UTC](https://discourse.julialang.org/t/guix-importer/36802 "2020-03-31T16:42:38Z")

</div>

Would there be any interest in making a julia importer for the guix package manager which already acceses CRAN pypi Texlive Crate and few others?

---

## [Extending function with new keyword argument fails](https://discourse.julialang.org/t/extending-function-with-new-keyword-argument-fails/36770)

<div class="topic-metadata">

**Author:** [@SEA](https://discourse.julialang.org/u/SEA)\
**Replies:** 2\
**Last updated:** [March 31, 2020, 3:04pm UTC](https://discourse.julialang.org/t/extending-function-with-new-keyword-argument-fails/36770 "2020-03-31T15:04:39Z")

</div>

I ran into this problem while trying to extend stdlib’s cholesky with a new keyword argument. This is a minimal example. import LinearAlgebra: cholesky struct T end cholesky(A::AbstractMatrix, ::Val{false} = Val(false);…

---

## [I can't use the PackageCompiler](https://discourse.julialang.org/t/i-cant-use-the-packagecompiler/35732)

<div class="topic-metadata">

**Author:** [@Darione](https://discourse.julialang.org/u/Darione)\
**Replies:** 12\
**Last updated:** [March 31, 2020, 2:12pm UTC](https://discourse.julialang.org/t/i-cant-use-the-packagecompiler/35732 "2020-03-31T14:12:00Z")

</div>

I am retrying to use PackageCompiler, for the second time (the first, I was unable to produce an executable, because it gave me error). I am following - again - the instruction on https://julialang.github.io/PackageCom…

---

## [Thomas algorithm for banded matrices](https://discourse.julialang.org/t/thomas-algorithm-for-banded-matrices/23262)

<div class="topic-metadata">

**Author:** [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Replies:** 13\
**Last updated:** [March 31, 2020, 12:29pm UTC](https://discourse.julialang.org/t/thomas-algorithm-for-banded-matrices/23262 "2020-03-31T12:29:36Z")

</div>

Dear All, I am trying to solve linear systems Ax = rhs where A has a tridiagonal shape. When the type of A is tridiagonal, one can use the thomas algo to solve it. I find it faster than defining A as a Tridiagonal and c…

---

## [Images imfilter performance drops when using ImageView](https://discourse.julialang.org/t/images-imfilter-performance-drops-when-using-imageview/36630)

<div class="topic-metadata">

**Author:** [@wizebt](https://discourse.julialang.org/u/wizebt)\
**Replies:** 2\
**Last updated:** [March 31, 2020, 10:35am UTC](https://discourse.julialang.org/t/images-imfilter-performance-drops-when-using-imageview/36630 "2020-03-31T10:35:03Z")

</div>

Hi, imfilter exibit a huge variable performance drop when used in conjonction with ImageView. Here is the test code: using Images # ImageView function test\_imfilter() gk = Kernel.gaussian(2.0f0) I = rand(Float32,1…

---

## [Run CUDA.jl on AMD devices](https://discourse.julialang.org/t/run-cuda-jl-on-amd-devices/36782)

<div class="topic-metadata">

**Author:** [@DeepQ](https://discourse.julialang.org/u/DeepQ)\
**Replies:** 1\
**Last updated:** [March 31, 2020, 9:23am UTC](https://discourse.julialang.org/t/run-cuda-jl-on-amd-devices/36782 "2020-03-31T09:23:19Z")

</div>

Is there a way to run CUDA scripts on AMD GPUs?

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

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