# General Usage

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

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

**Page:** 909

---

## [Pkg update fails with "no method matching getindix(::Nothing, ::String)"](https://discourse.julialang.org/t/pkg-update-fails-with-no-method-matching-getindix-nothing-string/18849)

<div class="topic-metadata">

**Author:** [@crbinz](https://discourse.julialang.org/u/crbinz)\
**Replies:** 5\
**Last updated:** [December 20, 2018, 1:51pm UTC](https://discourse.julialang.org/t/pkg-update-fails-with-no-method-matching-getindix-nothing-string/18849 "2018-12-20T13:51:51Z")

</div>

(v1.0) pkg\> up Updating registry at \`C:\\Users\\cbinz\\.julia\\registries\\General\` Updating git-repo \`https://github.com/JuliaRegistries/General.git\` Updating git-repo \`https://github.com/JuliaPlots/StatsMakie.jl.git\` …

---

## [Fatal: 'upstream/gh-pages' is not a commit and a branch 'gh-pages' cannot be created from it](https://discourse.julialang.org/t/fatal-upstream-gh-pages-is-not-a-commit-and-a-branch-gh-pages-cannot-be-created-from-it/18026)

<div class="topic-metadata">

**Author:** [@goedman](https://discourse.julialang.org/u/goedman)\
**Replies:** 3\
**Last updated:** [December 20, 2018, 1:43pm UTC](https://discourse.julialang.org/t/fatal-upstream-gh-pages-is-not-a-commit-and-a-branch-gh-pages-cannot-be-created-from-it/18026 "2018-12-20T13:43:02Z")

</div>

Hi, In a new, still unregistered, package I am running into above error when trying to publish documentation. This is, amongst other things, an exercise using Literate.jl. I tried it a couple of times, including deleti…

---

## [Package Level Logging in Julia v1.0](https://discourse.julialang.org/t/package-level-logging-in-julia-v1-0/18706)

<div class="topic-metadata">

**Author:** [@ccoffrin](https://discourse.julialang.org/u/ccoffrin)\
**Replies:** 7\
**Last updated:** [December 20, 2018, 1:28pm UTC](https://discourse.julialang.org/t/package-level-logging-in-julia-v1-0/18706 "2018-12-20T13:28:17Z")

</div>

@ChrisRackauckas once told me that Julia v1.0’s built in logger would support package level logging. Is this true? If so do any examples exist? CC @pseudocubic, @kaarthiksundar

---

## [How to tell if a type is an efficient small type union?](https://discourse.julialang.org/t/how-to-tell-if-a-type-is-an-efficient-small-type-union/18829)

<div class="topic-metadata">

**Author:** [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Replies:** 11\
**Last updated:** [December 20, 2018, 8:45am UTC](https://discourse.julialang.org/t/how-to-tell-if-a-type-is-an-efficient-small-type-union/18829 "2018-12-20T08:45:35Z")

</div>

Vector{Union{Missing, Int}} is efficiently represented, but Vector{Union{Int, Float64}} isn’t. Is there a predicate to distinguish between the two, similar to isconcretetype?

---

## [Missing method to slice sparse matrices?](https://discourse.julialang.org/t/missing-method-to-slice-sparse-matrices/18430)

<div class="topic-metadata">

**Author:** [@dpo](https://discourse.julialang.org/u/dpo)\
**Replies:** 5\
**Last updated:** [December 20, 2018, 7:52am UTC](https://discourse.julialang.org/t/missing-method-to-slice-sparse-matrices/18430 "2018-12-20T07:52:15Z")

</div>

In Julia 1.0.2, julia\> D = convert(SparseMatrixCSC{Float32,Int32}, spdiagm(0 =\> rand(5))) julia\> D\[2:3,:\] ERROR: MethodError: no method matching getindex\_traverse\_col(::UnitRange{Int64}, ::Int32, ::Int64) Closest candi…

---

## [Broadcasting a function with some non-broadcasted inputs](https://discourse.julialang.org/t/broadcasting-a-function-with-some-non-broadcasted-inputs/18841)

<div class="topic-metadata">

**Author:** [@BioTurboNick](https://discourse.julialang.org/u/BioTurboNick)\
**Replies:** 4\
**Last updated:** [December 20, 2018, 6:15am UTC](https://discourse.julialang.org/t/broadcasting-a-function-with-some-non-broadcasted-inputs/18841 "2018-12-20T06:15:40Z")

</div>

I have a function that takes a matrix and two scalars. The matrix input is identical for each call, but the scalars change with each call. I would like to broadcast over vectors supplying those scalars. Is it possible to…

---

## [Simple is better than complex](https://discourse.julialang.org/t/simple-is-better-than-complex/18821)

<div class="topic-metadata">

**Author:** [@zhangliye](https://discourse.julialang.org/u/zhangliye)\
**Replies:** 10\
**Last updated:** [December 20, 2018, 12:56am UTC](https://discourse.julialang.org/t/simple-is-better-than-complex/18821 "2018-12-20T00:56:10Z")

</div>

For the following two version of Julia code, the first version is much simple and beautiful. However, it no longer works in Julia 1. Version 1: a = 0 # as simple as Python code for i in 1:10 a +=1 end @…

---

## [Interesting problem with where parameters](https://discourse.julialang.org/t/interesting-problem-with-where-parameters/18824)

<div class="topic-metadata">

**Author:** [@Qiyamah](https://discourse.julialang.org/u/Qiyamah)\
**Replies:** 3\
**Last updated:** [December 19, 2018, 7:51pm UTC](https://discourse.julialang.org/t/interesting-problem-with-where-parameters/18824 "2018-12-19T19:51:57Z")

</div>

I have the following code: abstract type TypedFun end abstract type ReturnFun{R} \<: TypedFun end abstract type NoArgFun{R} \<: ReturnFun{R} end abstract type FullFun{Tuple,R} \<: ReturnFun{R} end #…

---

## [Pkg and ssl certificates on Julia 0.7](https://discourse.julialang.org/t/pkg-and-ssl-certificates-on-julia-0-7/13895)

<div class="topic-metadata">

**Author:** [@samtkaplan](https://discourse.julialang.org/u/samtkaplan)\
**Replies:** 7\
**Last updated:** [December 19, 2018, 5:40pm UTC](https://discourse.julialang.org/t/pkg-and-ssl-certificates-on-julia-0-7/13895 "2018-12-19T17:40:01Z")

</div>

Hello, I am trying to use Julia 0.7 from behind a firewall on Linux. In addition, the system resign’s SSL certificates. In Julia 0.6, I was able to use an environment variable SSL\_CERT\_FILE to point to a local certif…

---

## [Stopping code if a given RAM limit is reached](https://discourse.julialang.org/t/stopping-code-if-a-given-ram-limit-is-reached/18593)

<div class="topic-metadata">

**Author:** [@mike\_k](https://discourse.julialang.org/u/mike_k)\
**Replies:** 8\
**Last updated:** [December 19, 2018, 5:24pm UTC](https://discourse.julialang.org/t/stopping-code-if-a-given-ram-limit-is-reached/18593 "2018-12-19T17:24:34Z")

</div>

Dear Community, maybe this is a very basic question. I need to run several computational experiments on a cluster, on which I need to reserve the amount of RAM used in advance. If a job exceeds that limit it is killed w…

---

## [Build IJulia with Julia 1.0.3](https://discourse.julialang.org/t/build-ijulia-with-julia-1-0-3/18833)

<div class="topic-metadata">

**Author:** [@HerAdri](https://discourse.julialang.org/u/HerAdri)\
**Replies:** 0\
**Last updated:** [December 19, 2018, 2:52pm UTC](https://discourse.julialang.org/t/build-ijulia-with-julia-1-0-3/18833 "2018-12-19T14:52:59Z")

</div>

As in the previous version I have problems with IJulia \_ \_ \_ \_(\_)\_ | Documentation: https://docs.julialang.org (\_) | (\_) (\_) | \_ \_ \_| |\_ \_\_ \_ | Type "?" for help, "\]?" for Pk…

---

## [Load only packages from the current environment](https://discourse.julialang.org/t/load-only-packages-from-the-current-environment/18823)

<div class="topic-metadata">

**Author:** [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Replies:** 1\
**Last updated:** [December 19, 2018, 10:41am UTC](https://discourse.julialang.org/t/load-only-packages-from-the-current-environment/18823 "2018-12-19T10:41:52Z")

</div>

Assume I have a package X in the default environment v1.0. Now I switch to a custom environment, e.g. activate whatever. By default, using X will work despite the fact that I never added X to whatever, because (AFAIU) th…

---

## [Package workflow: tag new versions](https://discourse.julialang.org/t/package-workflow-tag-new-versions/18803)

<div class="topic-metadata">

**Author:** [@matthieu](https://discourse.julialang.org/u/matthieu)\
**Replies:** 10\
**Last updated:** [December 19, 2018, 2:58am UTC](https://discourse.julialang.org/t/package-workflow-tag-new-versions/18803 "2018-12-19T02:58:27Z")

</div>

I develop a package in a .git folder in the dev folder of .julia. When I tag a new version of my package on Github (using Attobot), Julia does not update locally the version number of the package, even after I git pull t…

---

## [Compiling a Julia package to a shared library](https://discourse.julialang.org/t/compiling-a-julia-package-to-a-shared-library/18815)

<div class="topic-metadata">

**Author:** [@LewisHein](https://discourse.julialang.org/u/LewisHein)\
**Replies:** 4\
**Last updated:** [December 18, 2018, 11:37pm UTC](https://discourse.julialang.org/t/compiling-a-julia-package-to-a-shared-library/18815 "2018-12-18T23:37:35Z")

</div>

Hey all, I’m considering building some audio and image processing plugins to work in existing open-source software. Of course, I’d love to do this work in Julia, but these often need plugins that are shared libraries. I…

---

## [Accessing Dict of tuples](https://discourse.julialang.org/t/accessing-dict-of-tuples/18816)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 1\
**Last updated:** [December 18, 2018, 11:35pm UTC](https://discourse.julialang.org/t/accessing-dict-of-tuples/18816 "2018-12-18T23:35:44Z")

</div>

I just realized you can access a Dict of tuples passing the tuple with the extra parens. Has this always been the case? Or is this a recent addition to the language? For example, d = Dict((a,i) =\> randn() for a = 1:5 f…

---

## [Return CodeInfo instead of expression from a generated function?](https://discourse.julialang.org/t/return-codeinfo-instead-of-expression-from-a-generated-function/18804)

<div class="topic-metadata">

**Author:** [@dfdx](https://discourse.julialang.org/u/dfdx)\
**Replies:** 0\
**Last updated:** [December 18, 2018, 6:48pm UTC](https://discourse.julialang.org/t/return-codeinfo-instead-of-expression-from-a-generated-function/18804 "2018-12-18T18:48:15Z")

</div>

Is it possible to return a CodeInfo object instead of expression from a generated function? I’ve seen it in a couple of packages recently, but I can’t find any docs for it and my naive implementation fails with segfault: …

---

## [Is there any way to go back to 0.6.4?](https://discourse.julialang.org/t/is-there-any-way-to-go-back-to-0-6-4/18765)

<div class="topic-metadata">

**Author:** [@ronubi](https://discourse.julialang.org/u/ronubi)\
**Replies:** 11\
**Last updated:** [December 18, 2018, 5:48pm UTC](https://discourse.julialang.org/t/is-there-any-way-to-go-back-to-0-6-4/18765 "2018-12-18T17:48:36Z")

</div>

For one project, I was sticking with Julia 0.6.4 because my functions and notebooks worked with a bunch of data we are analyzing. I recently needed to do 2-D interpolations, so I did julia\> Pkg.add("Interpolations") an…

---

## [Fast fit of generalized pareto distribution](https://discourse.julialang.org/t/fast-fit-of-generalized-pareto-distribution/18774)

<div class="topic-metadata">

**Author:** [@daniel](https://discourse.julialang.org/u/daniel)\
**Replies:** 9\
**Last updated:** [December 18, 2018, 5:31pm UTC](https://discourse.julialang.org/t/fast-fit-of-generalized-pareto-distribution/18774 "2018-12-18T17:31:55Z")

</div>

I’ve implemented a (slightly adapted) julia version of the Generalized Pareto estimation method described in this paper: DOI 10.1198/TECH.2009.08017 Am I missing any obvious performance improvements? Is it correct that …

---

## [Genetic algorithms](https://discourse.julialang.org/t/genetic-algorithms/18792)

<div class="topic-metadata">

**Author:** [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Replies:** 10\
**Last updated:** [December 18, 2018, 4:44pm UTC](https://discourse.julialang.org/t/genetic-algorithms/18792 "2018-12-18T16:44:12Z")

</div>

I was wondering if anybody worked on/with GA implementations in Julia lately. I found three packages, but none of them seem to have been updated lately: https://wallacejl.readthedocs.io/en/latest/ Can anybody recomme…

---

## [How to customize the new broadcasting infrastructure in v0.7](https://discourse.julialang.org/t/how-to-customize-the-new-broadcasting-infrastructure-in-v0-7/11322)

<div class="topic-metadata">

**Author:** [@denizyuret](https://discourse.julialang.org/u/denizyuret)\
**Replies:** 12\
**Last updated:** [December 18, 2018, 3:38pm UTC](https://discourse.julialang.org/t/how-to-customize-the-new-broadcasting-infrastructure-in-v0-7/11322 "2018-12-18T15:38:41Z")

</div>

I want to ask about the new broadcasting operation in Julia 0.7 and the preferred way to customize it for custom types. I read the following: https://docs.julialang.org/en/latest/manual/interfaces/#man-interfaces-broad…

---

## [Defining custom subtype of AbstractArray](https://discourse.julialang.org/t/defining-custom-subtype-of-abstractarray/18799)

<div class="topic-metadata">

**Author:** [@ArjunNarayanan](https://discourse.julialang.org/u/ArjunNarayanan)\
**Replies:** 5\
**Last updated:** [December 18, 2018, 3:31pm UTC](https://discourse.julialang.org/t/defining-custom-subtype-of-abstractarray/18799 "2018-12-18T15:31:09Z")

</div>

I am having some trouble defining my struct as a subtype of AbstractArray. As an example, say I want to define a Point in dim dimensional space as follows: struct Point{dim} \<: AbstractArray{Float64,dim} x::NTuple{dim…

---

## [Merging Julia Packages folder](https://discourse.julialang.org/t/merging-julia-packages-folder/18796)

<div class="topic-metadata">

**Author:** [@alirezamecheng](https://discourse.julialang.org/u/alirezamecheng)\
**Replies:** 1\
**Last updated:** [December 18, 2018, 12:34pm UTC](https://discourse.julialang.org/t/merging-julia-packages-folder/18796 "2018-12-18T12:34:45Z")

</div>

Hello. in .julia folder there is another folder named packages. Consider two computer systems totally Identical. These PCs have the same version of Julia, Totally identical in every aspect. On system A I have a set of …

---

## [Closures section in documentation is not clear enough](https://discourse.julialang.org/t/closures-section-in-documentation-is-not-clear-enough/18717)

<div class="topic-metadata">

**Author:** [@andrea993](https://discourse.julialang.org/u/andrea993)\
**Replies:** 17\
**Last updated:** [December 18, 2018, 12:01pm UTC](https://discourse.julialang.org/t/closures-section-in-documentation-is-not-clear-enough/18717 "2018-12-18T12:01:20Z")

</div>

In the closures section there is only one example that is not clear enought to understand how to use closures in Julia. Can you provide some explaination and also an example about the correct way to make pseudo-objects …

---

## [Offline Julia 1.0 documentation](https://discourse.julialang.org/t/offline-julia-1-0-documentation/13263)

<div class="topic-metadata">

**Author:** [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)\
**Replies:** 13\
**Last updated:** [December 18, 2018, 11:07am UTC](https://discourse.julialang.org/t/offline-julia-1-0-documentation/13263 "2018-12-18T11:07:50Z")

</div>

Dear all, I was wondering if there are any updated docs about Julia basics/learning Julia that is really updated to v0.7 or v1.0: that does not require from an internet connection (like a .pdf) or so. Thanks a lot, Fe…

---

## [Imprecision of mean over iterators of large vectors](https://discourse.julialang.org/t/imprecision-of-mean-over-iterators-of-large-vectors/18759)

<div class="topic-metadata">

**Author:** [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Replies:** 7\
**Last updated:** [December 18, 2018, 7:48am UTC](https://discourse.julialang.org/t/imprecision-of-mean-over-iterators-of-large-vectors/18759 "2018-12-18T07:48:21Z")

</div>

To wit: julia\> N = 100000000; aa = rand(Float32, N); julia\> mean((x for x in aa)) 0.16777216f0 julia\> mean(aa) 0.500059f0 I know what’s happening: Float32 has limited accuracy, and mean over an iterator computes a “n…

---

## [Strange file open error on windows](https://discourse.julialang.org/t/strange-file-open-error-on-windows/18756)

<div class="topic-metadata">

**Author:** [@purplishrock](https://discourse.julialang.org/u/purplishrock)\
**Replies:** 5\
**Last updated:** [December 18, 2018, 7:00am UTC](https://discourse.julialang.org/t/strange-file-open-error-on-windows/18756 "2018-12-18T07:00:15Z")

</div>

I got a file open error trying to access a file on a windows network drive. julia said it could not open the file because the file does not exist, however the file DOES exist. Now, the first time this happened windows …

---

## [Why can't I modify the array in place when changing the type of array?](https://discourse.julialang.org/t/why-cant-i-modify-the-array-in-place-when-changing-the-type-of-array/18775)

<div class="topic-metadata">

**Author:** [@shipengcheng1230](https://discourse.julialang.org/u/shipengcheng1230)\
**Replies:** 2\
**Last updated:** [December 18, 2018, 3:39am UTC](https://discourse.julialang.org/t/why-cant-i-modify-the-array-in-place-when-changing-the-type-of-array/18775 "2018-12-18T03:39:02Z")

</div>

Hello, consider the following example: julia\> using SharedArrays julia\> function foo1(a::SharedArray) fill!(a, 4.0) end foo1 (generic function with 1 method) julia\> function foo2(a::AbstractArray) …

---

## [VGG19 to classify images](https://discourse.julialang.org/t/vgg19-to-classify-images/18772)

<div class="topic-metadata">

**Author:** [@skerdi\_zogaj](https://discourse.julialang.org/u/skerdi_zogaj)\
**Replies:** 1\
**Last updated:** [December 17, 2018, 11:48pm UTC](https://discourse.julialang.org/t/vgg19-to-classify-images/18772 "2018-12-17T23:48:24Z")

</div>

I want to use VGG19 to classify images like : vgg =VGG19() classify(vgg, image) But when i make those commands i have a problem with VGG19 that says : can not read end of file Can some one tell me where i have the pr…

---

## [Threading issues](https://discourse.julialang.org/t/threading-issues/18758)

<div class="topic-metadata">

**Author:** [@hackguy](https://discourse.julialang.org/u/hackguy)\
**Replies:** 0\
**Last updated:** [December 17, 2018, 6:43pm UTC](https://discourse.julialang.org/t/threading-issues/18758 "2018-12-17T18:43:15Z")

</div>

This is going to be quite long, I’m going to try to include everything I can. I’m trying to implement a parallel quicksort algorithm, as a part of a project to compare multiple programming languages. The way I’m doing i…

---

## [Debugging nested loops](https://discourse.julialang.org/t/debugging-nested-loops/18745)

<div class="topic-metadata">

**Author:** [@gdestouet](https://discourse.julialang.org/u/gdestouet)\
**Replies:** 0\
**Last updated:** [December 17, 2018, 2:16pm UTC](https://discourse.julialang.org/t/debugging-nested-loops/18745 "2018-12-17T14:16:21Z")

</div>

Hello everyone, I am trying to debug a complex function with nested for-loops by using the following trick to get some cues about which variables are causing problems for ... some variables being allocated ( va…

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

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