# General Usage

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

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

**Page:** 930

---

## [No gamma function found in Version 1.0.1 (2018-09-29)](https://discourse.julialang.org/t/no-gamma-function-found-in-version-1-0-1-2018-09-29/16234)

<div class="topic-metadata">

**Author:** [@Jim\_Baldwin](https://discourse.julialang.org/u/Jim_Baldwin)\
**Replies:** 5\
**Last updated:** [October 12, 2018, 3:55pm UTC](https://discourse.julialang.org/t/no-gamma-function-found-in-version-1-0-1-2018-09-29/16234 "2018-10-12T15:55:31Z")

</div>

I have just installed Julia Version 1.0.1 (2018-09-29) and the gamma function does not seem to exist. With julia\> gamma(6) I get ERROR: UndefVarError: gamma not defined Stacktrace: \[1\] top-level scope at none:0 B…

---

## [Inv(transpose(mat) ) causes warntype](https://discourse.julialang.org/t/inv-transpose-mat-causes-warntype/16216)

<div class="topic-metadata">

**Author:** [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Replies:** 1\
**Last updated:** [October 12, 2018, 2:06pm UTC](https://discourse.julialang.org/t/inv-transpose-mat-causes-warntype/16216 "2018-10-12T14:06:54Z")

</div>

hello, I found the following problem in both 1.0.0 and 1.0.1 mat = reshape(collect(1.0:4.0), 2, 2) julia\> @code\_warntype inv(transpose(mat) ) # gives warntype Body::Any @code\_warntype inv(copy(transpose(mat) ) ) …

---

## [\]dev RayTraceEllipsoid pulls old version](https://discourse.julialang.org/t/dev-raytraceellipsoid-pulls-old-version/16228)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 2\
**Last updated:** [October 12, 2018, 12:16pm UTC](https://discourse.julialang.org/t/dev-raytraceellipsoid-pulls-old-version/16228 "2018-10-12T12:16:50Z")

</div>

So I wanted to do some work on my registered package RayTraceEllipsoid.jl, so I \]dev RayTraceEllipsoid and realized that this was an old version from before the update to v1.0. But if I look at master online then it’s al…

---

## [Libdl.DL\_LOAD\_PATH](https://discourse.julialang.org/t/libdl-dl-load-path/16201)

<div class="topic-metadata">

**Author:** [@ksimon](https://discourse.julialang.org/u/ksimon)\
**Replies:** 1\
**Last updated:** [October 12, 2018, 11:27am UTC](https://discourse.julialang.org/t/libdl-dl-load-path/16201 "2018-10-12T11:27:17Z")

</div>

Hi Julia community, I am rewriting my code to move from Julia 0.6x to 1.0 and I stumbled over a little problem and could not find out how to solve it. I am loading one of my modules ‘MyMod’ and inside one of the module…

---

## [Can Not Use Triangular Matrix from Cholesky in Any Way](https://discourse.julialang.org/t/can-not-use-triangular-matrix-from-cholesky-in-any-way/16207)

<div class="topic-metadata">

**Author:** [@mcbro](https://discourse.julialang.org/u/mcbro)\
**Replies:** 14\
**Last updated:** [October 12, 2018, 10:02am UTC](https://discourse.julialang.org/t/can-not-use-triangular-matrix-from-cholesky-in-any-way/16207 "2018-10-12T10:02:46Z")

</div>

This is a regression in Julia 1.0. Consider this code using LinearAlgebra Umat = \[ 4.10229+0.0im -0.00360251-2.02412im ; -0.00360251+2.02412im 1.30966+0.0im\] R = cholesky(Umat) ; display(R) V = Array(R) ; display(V) X…

---

## [Interpolated string got memoized?](https://discourse.julialang.org/t/interpolated-string-got-memoized/16217)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 2\
**Last updated:** [October 12, 2018, 7:21am UTC](https://discourse.julialang.org/t/interpolated-string-got-memoized/16217 "2018-10-12T07:21:26Z")

</div>

Is it a bug or am I doing something wrong? julia\> function testme2(note) for i ∈ 65:68 c = Char(i) print("c=$c ") note = replace(note, "\_" =\> "$c") …

---

## [Error in gc in Pkg](https://discourse.julialang.org/t/error-in-gc-in-pkg/16215)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 1\
**Last updated:** [October 12, 2018, 6:37am UTC](https://discourse.julialang.org/t/error-in-gc-in-pkg/16215 "2018-10-12T06:37:20Z")

</div>

After updating some packages I tried a gc to obtain the error: (v1.0) pkg\> gc Active manifests at: \`/Users/amrods/.julia/environments/v0.7/Manifest.toml\` \`/Users/amrods/.julia/environments/v1.0/Manif…

---

## [Using SharedArray in parallel](https://discourse.julialang.org/t/using-sharedarray-in-parallel/16212)

<div class="topic-metadata">

**Author:** [@Caesar\_KG](https://discourse.julialang.org/u/Caesar_KG)\
**Replies:** 0\
**Last updated:** [October 12, 2018, 1:24am UTC](https://discourse.julialang.org/t/using-sharedarray-in-parallel/16212 "2018-10-12T01:24:43Z")

</div>

Has anyone confronted the following issue when using SharedArray in parallel? Error: could not create mapping view: The operation completed successfully in #call#616 at base\\sharedarray.jl:154 in #call#612 at base\\sh…

---

## [Julia / C mutable struct compiles much faster than struct](https://discourse.julialang.org/t/julia-c-mutable-struct-compiles-much-faster-than-struct/16141)

<div class="topic-metadata">

**Author:** [@klowrey](https://discourse.julialang.org/u/klowrey)\
**Replies:** 5\
**Last updated:** [October 12, 2018, 12:25am UTC](https://discourse.julialang.org/t/julia-c-mutable-struct-compiles-much-faster-than-struct/16141 "2018-10-12T00:25:10Z")

</div>

I’ve wrapped a C library for use in Julia, and have encountered a performance benefit to using a mutable struct as opposed to a struct; this is not what I would have expected. In short: the C-library usually deals with p…

---

## [Please explain syntax](https://discourse.julialang.org/t/please-explain-syntax/16148)

<div class="topic-metadata">

**Author:** [@govorunov](https://discourse.julialang.org/u/govorunov)\
**Replies:** 27\
**Last updated:** [October 11, 2018, 11:12pm UTC](https://discourse.julialang.org/t/please-explain-syntax/16148 "2018-10-11T23:12:13Z")

</div>

Hi. I recently started reading through Julia base library code and stumbled on the following syntax (char.jl): Char (::Type{T})(x::Number) where {T\<:AbstractChar} = T(UInt32(x)) (::Type{AbstractChar})(x::Number) = Char…

---

## [ApproxFun causes Jupyter to hang](https://discourse.julialang.org/t/approxfun-causes-jupyter-to-hang/16147)

<div class="topic-metadata">

**Author:** [@LewisHein](https://discourse.julialang.org/u/LewisHein)\
**Replies:** 5\
**Last updated:** [October 11, 2018, 7:41pm UTC](https://discourse.julialang.org/t/approxfun-causes-jupyter-to-hang/16147 "2018-10-11T19:41:29Z")

</div>

Hey everyone, I’m currently trying to use ApproxFun in a Jupyter notebook, but the cell containing Using ApproxFun never terminates. I can load ApproxFun fine (albeit a bit slowly) in the terminal Is this a known issue?…

---

## [X .-= 2 for scalar x fails](https://discourse.julialang.org/t/x-2-for-scalar-x-fails/16187)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 1\
**Last updated:** [October 11, 2018, 4:21pm UTC](https://discourse.julialang.org/t/x-2-for-scalar-x-fails/16187 "2018-10-11T16:21:48Z")

</div>

julia\> x = 1 1 julia\> x .-= 2 ERROR: MethodError: no method matching copyto!(::Int64, ::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{0},Tuple{},typeof(-),Tuple{Int64,Int64}}) Is this intentional? Since s…

---

## [Intervals.jl vs IntervalSets.jl?](https://discourse.julialang.org/t/intervals-jl-vs-intervalsets-jl/16173)

<div class="topic-metadata">

**Author:** [@galenlynch](https://discourse.julialang.org/u/galenlynch)\
**Replies:** 1\
**Last updated:** [October 11, 2018, 3:58pm UTC](https://discourse.julialang.org/t/intervals-jl-vs-intervalsets-jl/16173 "2018-10-11T15:58:37Z")

</div>

IntervalSets.jl and Intervals.jl seem to accomplish pretty similar things, and it’s hard to tell if one is more active than the other. Has anyone compared the two? If so, what were your conclusions?

---

## [Add band around point scatter](https://discourse.julialang.org/t/add-band-around-point-scatter/16181)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 11\
**Last updated:** [October 11, 2018, 2:40pm UTC](https://discourse.julialang.org/t/add-band-around-point-scatter/16181 "2018-10-11T14:40:41Z")

</div>

I have two datasets and I want to emphasize that one of them has smaller “noise level” than the other one. For example: pts1\_x = \[10randn() for i = 1 : 100\] pts1\_y = pts1\_x.^2 .+ \[100randn() for i = 1:100\] pts2\_x = \[10r…

---

## [Fill in own default for an option passed to a subfunction](https://discourse.julialang.org/t/fill-in-own-default-for-an-option-passed-to-a-subfunction/16114)

<div class="topic-metadata">

**Author:** [@kellertuer](https://discourse.julialang.org/u/kellertuer)\
**Replies:** 1\
**Last updated:** [October 11, 2018, 2:07pm UTC](https://discourse.julialang.org/t/fill-in-own-default-for-an-option-passed-to-a-subfunction/16114 "2018-10-11T14:07:45Z")

</div>

If I have a function subF that has some optional arguments, maybe (to get an MWE) subF(a::Int; c::Int=13) = a+c and in general the value 13is a very good idea in general. Now I write my main function (well one of them…

---

## [Missing functions in v1](https://discourse.julialang.org/t/missing-functions-in-v1/16139)

<div class="topic-metadata">

**Author:** [@asasa](https://discourse.julialang.org/u/asasa)\
**Replies:** 8\
**Last updated:** [October 11, 2018, 1:31pm UTC](https://discourse.julialang.org/t/missing-functions-in-v1/16139 "2018-10-11T13:31:50Z")

</div>

Hello, I’ve recently installed Julia v1, but I already found some useful functions for me that are missing. These were present in v0.6 but I cannot find these or similar one in v1. These functions are hex : convert an…

---

## [Is a debugger embeded in the new JuliaPro v1.0.1.1?](https://discourse.julialang.org/t/is-a-debugger-embeded-in-the-new-juliapro-v1-0-1-1/16146)

<div class="topic-metadata">

**Author:** [@chobbes](https://discourse.julialang.org/u/chobbes)\
**Replies:** 2\
**Last updated:** [October 11, 2018, 9:24am UTC](https://discourse.julialang.org/t/is-a-debugger-embeded-in-the-new-juliapro-v1-0-1-1/16146 "2018-10-11T09:24:55Z")

</div>

IIUC, the new JuliaPro 1.0.1.1 is released. But haven’t seen any official announcement yet. Is it shipped with a debugger? The first figure on the page implies the accessibility to a debugger.

---

## [Base conversion (hex, bin, octal...)](https://discourse.julialang.org/t/base-conversion-hex-bin-octal/15969)

<div class="topic-metadata">

**Author:** [@JuliaCaesar](https://discourse.julialang.org/u/JuliaCaesar)\
**Replies:** 15\
**Last updated:** [October 11, 2018, 8:29am UTC](https://discourse.julialang.org/t/base-conversion-hex-bin-octal/15969 "2018-10-11T08:29:21Z")

</div>

Hi, seems that some functions vanished in the 1.x release. Can’t find something on the docs. Any help welcome !

---

## [Negation of boolean array](https://discourse.julialang.org/t/negation-of-boolean-array/16159)

<div class="topic-metadata">

**Author:** [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Replies:** 1\
**Last updated:** [October 11, 2018, 8:01am UTC](https://discourse.julialang.org/t/negation-of-boolean-array/16159 "2018-10-11T08:01:31Z")

</div>

This is a slightly silly question I guess, but I spent more time trying to figure this out now than I should have so here goes: what’s the idiomatic way to negate an Array of Bools? julia\> !true false julia\> a = \[true …

---

## [Atom snippets for linspace etc](https://discourse.julialang.org/t/atom-snippets-for-linspace-etc/16156)

<div class="topic-metadata">

**Author:** [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Replies:** 0\
**Last updated:** [October 11, 2018, 6:33am UTC](https://discourse.julialang.org/t/atom-snippets-for-linspace-etc/16156 "2018-10-11T06:33:06Z")

</div>

I find it tedious to use the new range constructor, especially to construct logarithmically spaced ranges. exp10.(range(-1, stop=1, length=10)) I therefore created atom snippets to write them out for me. Now I only hav…

---

## [Deprecated Syntax - ignore](https://discourse.julialang.org/t/deprecated-syntax-ignore/16150)

<div class="topic-metadata">

**Author:** [@Ajaychat3](https://discourse.julialang.org/u/Ajaychat3)\
**Replies:** 2\
**Last updated:** [October 11, 2018, 4:46am UTC](https://discourse.julialang.org/t/deprecated-syntax-ignore/16150 "2018-10-11T04:46:58Z")

</div>

julia\> logspace(1,2,5) ┌ Warning: logspace(start, stop, n; base=10) is deprecated, use base .^ range(start, stop=stop, length=n) instead. │ caller = top-level scope at none:0 └ @ Core none:0 5-element Array{Float64…

---

## [Need help making my first Julia package](https://discourse.julialang.org/t/need-help-making-my-first-julia-package/16138)

<div class="topic-metadata">

**Author:** [@danielc](https://discourse.julialang.org/u/danielc)\
**Replies:** 5\
**Last updated:** [October 10, 2018, 11:25pm UTC](https://discourse.julialang.org/t/need-help-making-my-first-julia-package/16138 "2018-10-10T23:25:15Z")

</div>

Hello, I am writing a Julia package that I want to make publicly available on GitHub. I am been following the instructions on this website: https://docs.julialang.org/en/v1/stdlib/Pkg/ I am mostly done. I used pkg\> ad…

---

## [Displaying amount of data sent to worker](https://discourse.julialang.org/t/displaying-amount-of-data-sent-to-worker/16134)

<div class="topic-metadata">

**Author:** [@raminammour](https://discourse.julialang.org/u/raminammour)\
**Replies:** 0\
**Last updated:** [October 10, 2018, 8:46pm UTC](https://discourse.julialang.org/t/displaying-amount-of-data-sent-to-worker/16134 "2018-10-10T20:46:55Z")

</div>

Hello, I am trying to produce an example that shows the subtle differences in writing code in a distributed setting. Here is a contrived example: function bla1(rho,nc1) t1=@fetchfrom workers()\[1\] Sys.free\_memory(…

---

## [Multiplying \`I\` to a sparse matrix drops explicit zeros](https://discourse.julialang.org/t/multiplying-i-to-a-sparse-matrix-drops-explicit-zeros/16130)

<div class="topic-metadata">

**Author:** [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Replies:** 3\
**Last updated:** [October 10, 2018, 8:17pm UTC](https://discourse.julialang.org/t/multiplying-i-to-a-sparse-matrix-drops-explicit-zeros/16130 "2018-10-10T20:17:24Z")

</div>

I just noticed that multiplying I to a sparse matrix drops the explicit zeros stored in the sparse matrix. For example, A is a 2×2 zero matrix, but it has an explicit zero entry at (1,1): julia\> VERSION v"0.7.1-pre.0" …

---

## [Canonical way to obtain \`NamedTuple\` from kwargs](https://discourse.julialang.org/t/canonical-way-to-obtain-namedtuple-from-kwargs/16075)

<div class="topic-metadata">

**Author:** [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Replies:** 13\
**Last updated:** [October 10, 2018, 7:17pm UTC](https://discourse.julialang.org/t/canonical-way-to-obtain-namedtuple-from-kwargs/16075 "2018-10-10T19:17:03Z")

</div>

I kept forgetting to ask this. Keyword args are returned as a Pairs iterator. This cannot be converted to a NamedTuple. The simplest way I can see to obtain a NamedTuple from this would be kwargs.data. Presumably thi…

---

## [Embedding Julia in Java example, "Unreachable reached"](https://discourse.julialang.org/t/embedding-julia-in-java-example-unreachable-reached/16126)

<div class="topic-metadata">

**Author:** [@samtkaplan](https://discourse.julialang.org/u/samtkaplan)\
**Replies:** 0\
**Last updated:** [October 10, 2018, 6:00pm UTC](https://discourse.julialang.org/t/embedding-julia-in-java-example-unreachable-reached/16126 "2018-10-10T18:00:49Z")

</div>

Hello, I am trying to embed julia into a Java library. However, the java code ends up crashing with the following error “Unreachable reached at ”. I managed to put together a minimal example which I posted in a GItHub…

---

## [Standard test script code (eg Travis)](https://discourse.julialang.org/t/standard-test-script-code-eg-travis/16117)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 4\
**Last updated:** [October 10, 2018, 3:22pm UTC](https://discourse.julialang.org/t/standard-test-script-code-eg-travis/16117 "2018-10-10T15:22:30Z")

</div>

Where can I find the code that is run on Travis in absence of a custom test script? I want to use it on Gitlab.

---

## [UndefVarError: N not defined](https://discourse.julialang.org/t/undefvarerror-n-not-defined/16105)

<div class="topic-metadata">

**Author:** [@MMalakhov](https://discourse.julialang.org/u/MMalakhov)\
**Replies:** 10\
**Last updated:** [October 10, 2018, 1:58pm UTC](https://discourse.julialang.org/t/undefvarerror-n-not-defined/16105 "2018-10-10T13:58:08Z")

</div>

Hi! Upgraded Julia to 1.0.1 from 0.7. Don’t want to say nice worlds, that I have to put all this spaces between .\* operators and that someone genius renamed linspace and repmat functions. I’m strong enough to change it i…

---

## [Errors for Git / Pkg](https://discourse.julialang.org/t/errors-for-git-pkg/9351)

<div class="topic-metadata">

**Author:** [@avik](https://discourse.julialang.org/u/avik)\
**Replies:** 16\
**Last updated:** [October 10, 2018, 1:09pm UTC](https://discourse.julialang.org/t/errors-for-git-pkg/9351 "2018-10-10T13:09:19Z")

</div>

There have been various reports of issues running package operations recently. They manifest as one of the following messages on running any package operations, such as Pkg.init or Pkg.add: ERROR: GitError(Code:ERROR, C…

---

## [Filter(.., ::Tuple)](https://discourse.julialang.org/t/filter-tuple/16108)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 1\
**Last updated:** [October 10, 2018, 9:42am UTC](https://discourse.julialang.org/t/filter-tuple/16108 "2018-10-10T09:42:35Z")

</div>

Since there is no filter for Tuples, eg julia\> t = (1, 2, 3) (1, 2, 3) julia\> filter(isodd, t) ERROR: MethodError: no method matching filter(::typeof(isodd), ::Tuple{Int64,Int64,Int64}) Closest candidates are: filter…

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

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