# General Usage

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

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

**Page:** 833

---

## [Circshift an array with undef elements](https://discourse.julialang.org/t/circshift-an-array-with-undef-elements/28763)

<div class="topic-metadata">

**Author:** [@zekeriya.sari](https://discourse.julialang.org/u/zekeriya.sari)\
**Replies:** 6\
**Last updated:** [September 14, 2019, 6:06pm UTC](https://discourse.julialang.org/t/circshift-an-array-with-undef-elements/28763 "2019-09-14T18:06:46Z")

</div>

Is there way to circshift an array with undef element. When this is tried, below is the exception thrown. julia\> a = Vector{Vector{Float64}}(undef, 3) a3-element Array{Array{Float64,1},1}: #undef #undef #undef juli…

---

## [Testing multiple packages in a batch](https://discourse.julialang.org/t/testing-multiple-packages-in-a-batch/28756)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 6\
**Last updated:** [September 14, 2019, 1:15pm UTC](https://discourse.julialang.org/t/testing-multiple-packages-in-a-batch/28756 "2019-09-14T13:15:20Z")

</div>

I have multiple packages that I would like to test more or less automatically. For an arbitrary one of these I would clone it, start Julia, and do: cd("Package path") using Pkg …

---

## [Drop array dimension with Statistics.mean etc](https://discourse.julialang.org/t/drop-array-dimension-with-statistics-mean-etc/28759)

<div class="topic-metadata">

**Author:** [@leethargo](https://discourse.julialang.org/u/leethargo)\
**Replies:** 3\
**Last updated:** [September 14, 2019, 12:47pm UTC](https://discourse.julialang.org/t/drop-array-dimension-with-statistics-mean-etc/28759 "2019-09-14T12:47:20Z")

</div>

I’m using aggregations such as Statistics.mean on multi-dimension arrays, working across a specific dimension. The default behavior is to return an Array with the same number of dimensions, but only one entry in the aggr…

---

## [General vs Custom Registries](https://discourse.julialang.org/t/general-vs-custom-registries/28687)

<div class="topic-metadata">

**Author:** [@cortner](https://discourse.julialang.org/u/cortner)\
**Replies:** 14\
**Last updated:** [September 14, 2019, 10:23am UTC](https://discourse.julialang.org/t/general-vs-custom-registries/28687 "2019-09-14T10:23:34Z")

</div>

I am interested in views on registering a package in the General registry versus managing my own Custom Registry. For some packages that are widely used this is obvious (ForwarsDiff, Optim, StaticArrays, . . .); But wha…

---

## [Performance of Dates.Time equality and comparison](https://discourse.julialang.org/t/performance-of-dates-time-equality-and-comparison/28738)

<div class="topic-metadata">

**Author:** [@artemsolod](https://discourse.julialang.org/u/artemsolod)\
**Replies:** 3\
**Last updated:** [September 14, 2019, 10:09am UTC](https://discourse.julialang.org/t/performance-of-dates-time-equality-and-comparison/28738 "2019-09-14T10:09:45Z")

</div>

I am noticing large performance costs when doing operations with Time (as compared to DateTime). One example would be using Dates n = now(); arr\_dt = \[n for \_ in 1:10^7\]; arr\_ts = Time.(arr\_dt); all(arr\_dt .== arr\_dt);…

---

## [Function f(::T{A})::A where A ... VS f(::T{A})::A where A](https://discourse.julialang.org/t/function-f-t-a-a-where-a-vs-f-t-a-a-where-a/28746)

<div class="topic-metadata">

**Author:** [@o314](https://discourse.julialang.org/u/o314)\
**Replies:** 2\
**Last updated:** [September 14, 2019, 4:58am UTC](https://discourse.julialang.org/t/function-f-t-a-a-where-a-vs-f-t-a-a-where-a/28746 "2019-09-14T04:58:15Z")

</div>

Suppose we have a parametric type using Test struct T{A} end And a function above this type with an explicit return type. Here is the long form. Works ok function f(::T{A})::A where A one(A) end @test f(T{Int}(…

---

## [Append!() with Tuple and Dict](https://discourse.julialang.org/t/append-with-tuple-and-dict/6471)

<div class="topic-metadata">

**Author:** [@giuan](https://discourse.julialang.org/u/giuan)\
**Replies:** 7\
**Last updated:** [September 13, 2019, 3:44pm UTC](https://discourse.julialang.org/t/append-with-tuple-and-dict/6471 "2019-09-13T15:44:25Z")

</div>

Why x = Any\[1,2\] append!(x,Dict("a"=\>1,"b"=\>2)) append!(x,("j","k")) println(x) print Any\[1, 2, "b"=\>2, "a"=\>1, "j", "k"\]? In python x = \[1,2\] x.append({"a":1,"b":2}) x.append(("a","b")) print(x) print \[1, 2, {'a': …

---

## [\[Interact.jl\] faulty ribbons in gif](https://discourse.julialang.org/t/interact-jl-faulty-ribbons-in-gif/28715)

<div class="topic-metadata">

**Author:** [@MatFi](https://discourse.julialang.org/u/MatFi)\
**Replies:** 0\
**Last updated:** [September 13, 2019, 9:10am UTC](https://discourse.julialang.org/t/interact-jl-faulty-ribbons-in-gif/28715 "2019-09-13T09:10:06Z")

</div>

When using interact together with @manipulate all seems to be fine using Plots, Interact gr() x=-2:0.1:5 ui = @manipulate for i in Interact.slider(1:10;label="time", value=1) plot(x,i\*exp.(-x).+i\*exp.(2\*x),ribbon=10…

---

## [Problem with parametric method definition](https://discourse.julialang.org/t/problem-with-parametric-method-definition/28683)

<div class="topic-metadata">

**Author:** [@pnalysz](https://discourse.julialang.org/u/pnalysz)\
**Replies:** 4\
**Last updated:** [September 13, 2019, 7:33am UTC](https://discourse.julialang.org/t/problem-with-parametric-method-definition/28683 "2019-09-13T07:33:09Z")

</div>

Hi, How to adjust definition of f so it works for both As and Bs types in the following code: struct A end struct B{b} end va = Vector{Union{A, Missing}}() vb = Vector{Union{B, Missing}}() f(v::Vector{Union{t, Missin…

---

## [Why does \`write\` not have \`!\` in its name?](https://discourse.julialang.org/t/why-does-write-not-have-in-its-name/28201)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 2\
**Last updated:** [September 13, 2019, 5:06am UTC](https://discourse.julialang.org/t/why-does-write-not-have-in-its-name/28201 "2019-09-13T05:06:24Z")

</div>

Julia style guide suggests appending an ! to the function’s name. I am curious about why write does not follow this guide? Isn’t write modifying io or filename? What is the boundary of distinguishing modifying or not? w…

---

## [Save and restore DataFrame, and serialize()/deserialize()](https://discourse.julialang.org/t/save-and-restore-dataframe-and-serialize-deserialize/9699)

<div class="topic-metadata">

**Author:** [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Replies:** 13\
**Last updated:** [September 13, 2019, 5:00am UTC](https://discourse.julialang.org/t/save-and-restore-dataframe-and-serialize-deserialize/9699 "2019-09-13T05:00:41Z")

</div>

dear j wizards—is there a mechanism to save and restore a DataFrame in binary format to disk, with all type information? serialize() and deserialize() do not work for DataFrame in DataFrames.jl 0.11.5 . incidentally, …

---

## [Take part of string](https://discourse.julialang.org/t/take-part-of-string/28689)

<div class="topic-metadata">

**Author:** [@romeritomorais](https://discourse.julialang.org/u/romeritomorais)\
**Replies:** 2\
**Last updated:** [September 13, 2019, 4:51am UTC](https://discourse.julialang.org/t/take-part-of-string/28689 "2019-09-13T04:51:28Z")

</div>

how do I get part of a string from a field in the dataframe

---

## [Status of AxisArrays.jl](https://discourse.julialang.org/t/status-of-axisarrays-jl/28682)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 21\
**Last updated:** [September 13, 2019, 4:19am UTC](https://discourse.julialang.org/t/status-of-axisarrays-jl/28682 "2019-09-13T04:19:53Z")

</div>

Hello, What is the status of this package? Even though there was some activity lately it looks as if it lacks a little bit of love an care… Can it already be used in a production system, or are a lot of hidden bugs to…

---

## [Square Bracket Notation for Broadcasting getindex Across Array of Vectors?](https://discourse.julialang.org/t/square-bracket-notation-for-broadcasting-getindex-across-array-of-vectors/6227)

<div class="topic-metadata">

**Author:** [@jessebett](https://discourse.julialang.org/u/jessebett)\
**Replies:** 5\
**Last updated:** [September 13, 2019, 1:14am UTC](https://discourse.julialang.org/t/square-bracket-notation-for-broadcasting-getindex-across-array-of-vectors/6227 "2019-09-13T01:14:30Z")

</div>

Hi, I’m working with an array holding 2D points so I can plot a trajectory of an iterative process. Each point has the type Vector{Float64}, e.g. \[1., 2.\] My array has the type Vector{Array{Float64,1}}, E.g. traject…

---

## [Run command](https://discourse.julialang.org/t/run-command/28668)

<div class="topic-metadata">

**Author:** [@Luiz1](https://discourse.julialang.org/u/Luiz1)\
**Replies:** 2\
**Last updated:** [September 12, 2019, 3:00pm UTC](https://discourse.julialang.org/t/run-command/28668 "2019-09-12T15:00:30Z")

</div>

I need to run: run(zip code.zip "\*.jl") But \* does not work. Help please.

---

## [Mapfoldr and inference on Tuple](https://discourse.julialang.org/t/mapfoldr-and-inference-on-tuple/28657)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 2\
**Last updated:** [September 12, 2019, 8:45am UTC](https://discourse.julialang.org/t/mapfoldr-and-inference-on-tuple/28657 "2019-09-12T08:45:58Z")

</div>

I would like mapfoldr to infer on a Tuple. MWE: using Test prefix\_combinations(x, y) = vec(((x, y) -\> (x, y...)).(x, permutedims(y))) @inferred prefix\_combinations(\[1, 2\], \[(3, ), (4, )\]) # OK f1(D) = mapfoldr(Base.OneT…

---

## [Broadcast a function to a generator of tuples](https://discourse.julialang.org/t/broadcast-a-function-to-a-generator-of-tuples/28672)

<div class="topic-metadata">

**Author:** [@milesf](https://discourse.julialang.org/u/milesf)\
**Replies:** 2\
**Last updated:** [September 12, 2019, 2:29am UTC](https://discourse.julialang.org/t/broadcast-a-function-to-a-generator-of-tuples/28672 "2019-09-12T02:29:01Z")

</div>

I have a generator that produces tuples, and I’d like to call a function with the contents of each tuple as arguments. The output I’m looking for should be equivalent to 2(1:3). julia\> g = ((x,x) for x=1:3) Base.Genera…

---

## [@cfunction cannot find function defined in the same module](https://discourse.julialang.org/t/cfunction-cannot-find-function-defined-in-the-same-module/28658)

<div class="topic-metadata">

**Author:** [@pemryan](https://discourse.julialang.org/u/pemryan)\
**Replies:** 3\
**Last updated:** [September 12, 2019, 12:57am UTC](https://discourse.julialang.org/t/cfunction-cannot-find-function-defined-in-the-same-module/28658 "2019-09-12T00:57:28Z")

</div>

I’d like to use a function f() defined in a module as a callback in another function g() in the same module. However, I encountered this error: ERROR: LoadError: UndefVarError: f not defined. moving the definition of f…

---

## [Potential Julia 1.3 memory bug. Can someone help me diagnose before I submit an issue?](https://discourse.julialang.org/t/potential-julia-1-3-memory-bug-can-someone-help-me-diagnose-before-i-submit-an-issue/28652)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 5\
**Last updated:** [September 12, 2019, 12:40am UTC](https://discourse.julialang.org/t/potential-julia-1-3-memory-bug-can-someone-help-me-diagnose-before-i-submit-an-issue/28652 "2019-09-12T00:40:48Z")

</div>

I am trying to define a Vector type where it has a pointer to a compressed vector and a pointer to an uncompressed vector. To save RAM initially only the compressed vector is stored in memory. Upon accessing an element o…

---

## [Speeding Up a Backward Induction Code](https://discourse.julialang.org/t/speeding-up-a-backward-induction-code/27762)

<div class="topic-metadata">

**Author:** [@jmcastro2109](https://discourse.julialang.org/u/jmcastro2109)\
**Replies:** 30\
**Last updated:** [September 11, 2019, 5:56pm UTC](https://discourse.julialang.org/t/speeding-up-a-backward-induction-code/27762 "2019-09-11T17:56:41Z")

</div>

Hi all! I am solving a model and after Profiling the code I realized that the function myfun2 is the big bottleneck of my code. I created a MWE that preserves the computational cost of doing this function and I wanted to…

---

## [How to set “sslVerify = false” for using Pkg?](https://discourse.julialang.org/t/how-to-set-sslverify-false-for-using-pkg/28637)

<div class="topic-metadata">

**Author:** [@sschoi](https://discourse.julialang.org/u/sschoi)\
**Replies:** 0\
**Last updated:** [September 11, 2019, 5:50am UTC](https://discourse.julialang.org/t/how-to-set-sslverify-false-for-using-pkg/28637 "2019-09-11T05:50:58Z")

</div>

In the command line, “git clone” works with “sslVerify = false” set in “.gitconfig”. How can I have the setting “sslVerify = false” in Pkg? Is there any environmental variable for this? (For proxy as an example, I set H…

---

## [Tracking memory usage in unit tests (a lot worse in Julia 0.7 than 0.6)](https://discourse.julialang.org/t/tracking-memory-usage-in-unit-tests-a-lot-worse-in-julia-0-7-than-0-6/14444)

<div class="topic-metadata">

**Author:** [@bennedich](https://discourse.julialang.org/u/bennedich)\
**Replies:** 28\
**Last updated:** [September 11, 2019, 5:31am UTC](https://discourse.julialang.org/t/tracking-memory-usage-in-unit-tests-a-lot-worse-in-julia-0-7-than-0-6/14444 "2019-09-11T05:31:03Z")

</div>

Upgrading our package from Julia 0.6 to 0.7, we’ve noticed that unit tests use a lot more memory. Trivial tests that should in theory allocate a few KB can now allocate hundreds of MB. A minimal example: function test()…

---

## [Index Image with BitArray](https://discourse.julialang.org/t/index-image-with-bitarray/28625)

<div class="topic-metadata">

**Author:** [@rand5](https://discourse.julialang.org/u/rand5)\
**Replies:** 2\
**Last updated:** [September 10, 2019, 10:04pm UTC](https://discourse.julialang.org/t/index-image-with-bitarray/28625 "2019-09-10T22:04:18Z")

</div>

Is it no longer possible to index an image with a BitArray? I see the following example on the Images.jl doc page https://github.com/JuliaImages/ImageView.jl: using ImageView, TestImages, Colors # Prepare the data mri…

---

## [\[Windows Server 2016\] GitError ECERTIFICATE using Pkg (git worked in cmd)](https://discourse.julialang.org/t/windows-server-2016-giterror-ecertificate-using-pkg-git-worked-in-cmd/28598)

<div class="topic-metadata">

**Author:** [@sschoi](https://discourse.julialang.org/u/sschoi)\
**Replies:** 1\
**Last updated:** [September 10, 2019, 9:15pm UTC](https://discourse.julialang.org/t/windows-server-2016-giterror-ecertificate-using-pkg-git-worked-in-cmd/28598 "2019-09-10T21:15:23Z")

</div>

I would like to ask about GitError in Windows Server 2016. While “git clone” worked in cmd, I am experiencing GitError ECERTIFICATE using Pkg. (MS easyfix51044 cannot be applied to Windows Server 2016) How can I manage …

---

## [Funcção Input()](https://discourse.julialang.org/t/funccao-input/28617)

<div class="topic-metadata">

**Author:** [@romeritomorais](https://discourse.julialang.org/u/romeritomorais)\
**Replies:** 1\
**Last updated:** [September 10, 2019, 5:54pm UTC](https://discourse.julialang.org/t/funccao-input/28617 "2019-09-10T17:54:04Z")

</div>

no python uso “input()” para atribuir o valor a uma variavel, no Julia qual o comando similar??

---

## [Weird scoping issue/misunderstanding in JuMP.jl](https://discourse.julialang.org/t/weird-scoping-issue-misunderstanding-in-jump-jl/28604)

<div class="topic-metadata">

**Author:** [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Replies:** 11\
**Last updated:** [September 10, 2019, 5:05pm UTC](https://discourse.julialang.org/t/weird-scoping-issue-misunderstanding-in-jump-jl/28604 "2019-09-10T17:05:16Z")

</div>

I spent the last few hours hunting a bug and boiled it down to a behaviour which I do not understand at all. Here is an MWE which basically reflects the core of the issue I had with my package: using JuMP using Ipopt f…

---

## [How to get the total memory of a module](https://discourse.julialang.org/t/how-to-get-the-total-memory-of-a-module/28614)

<div class="topic-metadata">

**Author:** [@affans](https://discourse.julialang.org/u/affans)\
**Replies:** 0\
**Last updated:** [September 10, 2019, 4:35pm UTC](https://discourse.julialang.org/t/how-to-get-the-total-memory-of-a-module/28614 "2019-09-10T16:35:49Z")

</div>

I have a module that I’ve developed (it’s a simulation for a scientific experiment). The module basically looks like this: module thvaccine using Distributions using Parameters using Random using DataFrames using Dist…

---

## [A nonblocking \`pmap\`](https://discourse.julialang.org/t/a-nonblocking-pmap/28613)

<div class="topic-metadata">

**Author:** [@affans](https://discourse.julialang.org/u/affans)\
**Replies:** 0\
**Last updated:** [September 10, 2019, 4:21pm UTC](https://discourse.julialang.org/t/a-nonblocking-pmap/28613 "2019-09-10T16:21:26Z")

</div>

I am trying to run simulations in parallel but also have an updates on the simulation on the main thread. I basically have the following code: function calibration() numofsims = 10 siminfo = RemoteChannel(()-\>Ch…

---

## [Check Unicode character class](https://discourse.julialang.org/t/check-unicode-character-class/28475)

<div class="topic-metadata">

**Author:** [@Deuxis](https://discourse.julialang.org/u/Deuxis)\
**Replies:** 5\
**Last updated:** [September 10, 2019, 11:39am UTC](https://discourse.julialang.org/t/check-unicode-character-class/28475 "2019-09-10T11:39:01Z")

</div>

Hello, how can I check a Char’s Unicode character class? I need it for a lexer for a unicode-enabled language: I tracked down that Char’s show method uses Unicode.category\_abbrev, but trying to import that function gi…

---

## [Little parallel speedup on binary tree structure in Julia 1.3.0-rc1](https://discourse.julialang.org/t/little-parallel-speedup-on-binary-tree-structure-in-julia-1-3-0-rc1/28594)

<div class="topic-metadata">

**Author:** [@nmatzke](https://discourse.julialang.org/u/nmatzke)\
**Replies:** 0\
**Last updated:** [September 10, 2019, 9:18am UTC](https://discourse.julialang.org/t/little-parallel-speedup-on-binary-tree-structure-in-julia-1-3-0-rc1/28594 "2019-09-10T09:18:23Z")

</div>

Hi all, I am trying to use @spawn in Julia 1.3.0-rc1 to parallelize some slow calculations. My data is in a binary tree structure, where the calculations have to first be done at the tips, then the nodes ancestral to t…

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

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