# General Usage

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

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

**Page:** 810

---

## [Most efficient way: create/mutate DataFrame time column](https://discourse.julialang.org/t/most-efficient-way-create-mutate-dataframe-time-column/31548)

<div class="topic-metadata">

**Author:** [@Usor](https://discourse.julialang.org/u/Usor)\
**Replies:** 8\
**Last updated:** [November 28, 2019, 6:46pm UTC](https://discourse.julialang.org/t/most-efficient-way-create-mutate-dataframe-time-column/31548 "2019-11-28T18:46:02Z")

</div>

Suppose you have a DataFrame, which has a column called Year (with Int64). Then it has a column called Month (with String). Yes, suppose you have 12 rows with the integer year 2000 and the 12 months January to December a…

---

## [PARTR support for BLAS](https://discourse.julialang.org/t/partr-support-for-blas/31581)

<div class="topic-metadata">

**Author:** [@Yifan\_Liu](https://discourse.julialang.org/u/Yifan_Liu)\
**Replies:** 3\
**Last updated:** [November 28, 2019, 4:07pm UTC](https://discourse.julialang.org/t/partr-support-for-blas/31581 "2019-11-28T16:07:19Z")

</div>

I noticed that Julia 1.4 will have partr thread support for openblas. just curious, what kind of tasks will benefit from this support.

---

## [How to activate anaconda3\\Scripts\\activate.bat in Atom Juno](https://discourse.julialang.org/t/how-to-activate-anaconda3-scripts-activate-bat-in-atom-juno/31618)

<div class="topic-metadata">

**Author:** [@Sijun](https://discourse.julialang.org/u/Sijun)\
**Replies:** 1\
**Last updated:** [November 28, 2019, 11:59am UTC](https://discourse.julialang.org/t/how-to-activate-anaconda3-scripts-activate-bat-in-atom-juno/31618 "2019-11-28T11:59:53Z")

</div>

Hello, I just discovered that pyimport failed if conda environment is not activated with anaconda3\\Scripts\\activate.bat. How can I activate it from within atom Juno? Thank you!

---

## [How to check if a package is installed (in the LOAD\_PATH)?](https://discourse.julialang.org/t/how-to-check-if-a-package-is-installed-in-the-load-path/31610)

<div class="topic-metadata">

**Author:** [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Replies:** 10\
**Last updated:** [November 28, 2019, 10:10am UTC](https://discourse.julialang.org/t/how-to-check-if-a-package-is-installed-in-the-load-path/31610 "2019-11-28T10:10:12Z")

</div>

There has been a similar discussion in New Pkg: how to check if a package is installed? but the OP was satisfied with a solution based on Pkg.installed(). This, however, only checks whether MyPackage is installed in the …

---

## [PGFPlotsX: Hexagonal binning](https://discourse.julialang.org/t/pgfplotsx-hexagonal-binning/31580)

<div class="topic-metadata">

**Author:** [@fipelle](https://discourse.julialang.org/u/fipelle)\
**Replies:** 2\
**Last updated:** [November 28, 2019, 7:04am UTC](https://discourse.julialang.org/t/pgfplotsx-hexagonal-binning/31580 "2019-11-28T07:04:14Z")

</div>

Do you know of any gallery for PGFPlots that include an exagonal binning chart similar to Has anyone made scatter plots with hexagonal binning?? An example / gallery in LaTeX would also work.

---

## [Transformations on a 2D view's indices?](https://discourse.julialang.org/t/transformations-on-a-2d-views-indices/31609)

<div class="topic-metadata">

**Author:** [@ianshmean](https://discourse.julialang.org/u/ianshmean)\
**Replies:** 0\
**Last updated:** [November 28, 2019, 6:38am UTC](https://discourse.julialang.org/t/transformations-on-a-2d-views-indices/31609 "2019-11-28T06:38:25Z")

</div>

Is there a way to take a view on a 2D matrix, and do things like translate the indices, or even rotate the view? Say, something like this. using ColorTypes, ImageView x = zeros(RGBA, 1000, 1000) v = view(x, 400:600, 400…

---

## [Convert array of tuples to vector](https://discourse.julialang.org/t/convert-array-of-tuples-to-vector/31603)

<div class="topic-metadata">

**Author:** [@sboysel](https://discourse.julialang.org/u/sboysel)\
**Replies:** 6\
**Last updated:** [November 28, 2019, 3:49am UTC](https://discourse.julialang.org/t/convert-array-of-tuples-to-vector/31603 "2019-11-28T03:49:28Z")

</div>

I have an array of homogenous tuples (all the same length with elements of the same type). I’d like collapse or unpack this array into a single vector containing all elements of the tuples. Order does not matter in my …

---

## [Cosine seems slow](https://discourse.julialang.org/t/cosine-seems-slow/31507)

<div class="topic-metadata">

**Author:** [@sw72](https://discourse.julialang.org/u/sw72)\
**Replies:** 14\
**Last updated:** [November 27, 2019, 10:59am UTC](https://discourse.julialang.org/t/cosine-seems-slow/31507 "2019-11-27T10:59:28Z")

</div>

I’m finding the cos function slow in Julia compared with Mathematica. For example: a = RandomReal\[NormalDistribution\[\], {2000, 2000}\]; RepeatedTiming\[b = Cos\[a\];\] {0.018, Null} function test() a=randn(2000,2000…

---

## [Fail to call solvers from JuMP](https://discourse.julialang.org/t/fail-to-call-solvers-from-jump/31601)

<div class="topic-metadata">

**Author:** [@Ksun46](https://discourse.julialang.org/u/Ksun46)\
**Replies:** 0\
**Last updated:** [November 27, 2019, 9:12pm UTC](https://discourse.julialang.org/t/fail-to-call-solvers-from-jump/31601 "2019-11-27T21:12:25Z")

</div>

I was trying to use Ipopt from JuMP and got the following error julia\> using JuMP, Ipopt, Gurobi julia\> m = Model(with\_optimizer(Ipopt.Optimizer)) ERROR: MethodError: no method matching supports\_default\_copy\_to(::Ipopt…

---

## [Push! seems to be incorrect in this situation](https://discourse.julialang.org/t/push-seems-to-be-incorrect-in-this-situation/31589)

<div class="topic-metadata">

**Author:** [@ke\_xu](https://discourse.julialang.org/u/ke_xu)\
**Replies:** 7\
**Last updated:** [November 27, 2019, 7:56pm UTC](https://discourse.julialang.org/t/push-seems-to-be-incorrect-in-this-situation/31589 "2019-11-27T19:56:43Z")

</div>

function Append(vectorOfVector, vector) vector\[1\] = 0 push!(vectorOfVector,vector) vector\[1\] = 1 push!(vectorOfVector,vector) end vectorOfVectors = Vector{Vector{Int64}}() vector = Vector{Int64}(undef,1)…

---

## [Customize Terminal Colors](https://discourse.julialang.org/t/customize-terminal-colors/31512)

<div class="topic-metadata">

**Author:** [@Usor](https://discourse.julialang.org/u/Usor)\
**Replies:** 4\
**Last updated:** [November 27, 2019, 6:36pm UTC](https://discourse.julialang.org/t/customize-terminal-colors/31512 "2019-11-27T18:36:03Z")

</div>

Is there an easy way to customize Julia terminal colors directly? For example, can you type something like setterminalcolors(default) or setterminalcolor(prompt, orange); setterminalcolor(juliakeywords, brown); # and …

---

## [SystemError: mmap the operation completed successfully issue with SharedArrays](https://discourse.julialang.org/t/systemerror-mmap-the-operation-completed-successfully-issue-with-sharedarrays/31579)

<div class="topic-metadata">

**Author:** [@jmcastro2109](https://discourse.julialang.org/u/jmcastro2109)\
**Replies:** 0\
**Last updated:** [November 27, 2019, 2:12pm UTC](https://discourse.julialang.org/t/systemerror-mmap-the-operation-completed-successfully-issue-with-sharedarrays/31579 "2019-11-27T14:12:19Z")

</div>

I am confronting a very weird problem when parallelizing some function. The following MWE shows the problem using Distributed, SharedArrays rmprocs() addprocs() big\_array = rand(100,11,20000) function donothing(a) …

---

## [Deactivate Shortcut Control D](https://discourse.julialang.org/t/deactivate-shortcut-control-d/31511)

<div class="topic-metadata">

**Author:** [@Usor](https://discourse.julialang.org/u/Usor)\
**Replies:** 7\
**Last updated:** [November 27, 2019, 6:18pm UTC](https://discourse.julialang.org/t/deactivate-shortcut-control-d/31511 "2019-11-27T18:18:48Z")

</div>

Is there a quick convenient way to disable the shortcut Control D (used to quit)?

---

## [Quickest method to convert Vector of Strings to 3 Vectors of Floats](https://discourse.julialang.org/t/quickest-method-to-convert-vector-of-strings-to-3-vectors-of-floats/31522)

<div class="topic-metadata">

**Author:** [@scelles](https://discourse.julialang.org/u/scelles)\
**Replies:** 2\
**Last updated:** [November 27, 2019, 4:48pm UTC](https://discourse.julialang.org/t/quickest-method-to-convert-vector-of-strings-to-3-vectors-of-floats/31522 "2019-11-27T16:48:32Z")

</div>

Hello, I have a vector of String like a = \["0.309042 46.586349 111.4", "0.309042 46.586349 111.1", "0.309042 46.586349 111.3"\] and want to get 3 vectors of coordinates (longitude, latitude, altitude) (Float64) I did …

---

## [Best way to get all substrings or numbers matching a regex](https://discourse.julialang.org/t/best-way-to-get-all-substrings-or-numbers-matching-a-regex/31571)

<div class="topic-metadata">

**Author:** [@Maurice\_Diamantini](https://discourse.julialang.org/u/Maurice_Diamantini)\
**Replies:** 9\
**Last updated:** [November 27, 2019, 3:56pm UTC](https://discourse.julialang.org/t/best-way-to-get-all-substrings-or-numbers-matching-a-regex/31571 "2019-11-27T15:56:07Z")

</div>

Bonjour, What is the best way for getting a String on Number Vector from a regex (like with the old matchall method)? pat = r"\[+-\]?\\d+\\.?\\d\*" txt = "aaa -1 bbb +2.2 ccc 123.456 ddd" # findall? ranges = findall(pat, tx…

---

## [Variable Alias Analysis](https://discourse.julialang.org/t/variable-alias-analysis/31545)

<div class="topic-metadata">

**Author:** [@Qiyamah](https://discourse.julialang.org/u/Qiyamah)\
**Replies:** 1\
**Last updated:** [November 27, 2019, 3:49pm UTC](https://discourse.julialang.org/t/variable-alias-analysis/31545 "2019-11-27T15:49:08Z")

</div>

Hi, is there a way that I can perform an variable alias analysis on a piece of AST? Thanks

---

## [Function with Array of Abstract types as arguments](https://discourse.julialang.org/t/function-with-array-of-abstract-types-as-arguments/31574)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 4\
**Last updated:** [November 27, 2019, 2:59pm UTC](https://discourse.julialang.org/t/function-with-array-of-abstract-types-as-arguments/31574 "2019-11-27T14:59:10Z")

</div>

So, because julia\> Uniform{Float64} \<: Distribution true julia\> Array{Uniform{Float64},1} \<: Array{Distribution} false I cannot make a function like foo(a::Array{Distribution}) = nothing and call it with foo(\[Unifo…

---

## [How to ignore terminated process in pmap with no retry](https://discourse.julialang.org/t/how-to-ignore-terminated-process-in-pmap-with-no-retry/31578)

<div class="topic-metadata">

**Author:** [@altre](https://discourse.julialang.org/u/altre)\
**Replies:** 0\
**Last updated:** [November 27, 2019, 1:58pm UTC](https://discourse.julialang.org/t/how-to-ignore-terminated-process-in-pmap-with-no-retry/31578 "2019-11-27T13:58:08Z")

</div>

When a worker process in pmap gets killed, the parent worker aborts with a ProcessExitedException. Is there any way to prevent this? Fault tolerant \`pmap\` when worker goes down shows that it works when you specify a retr…

---

## [Recompiling stale cache files](https://discourse.julialang.org/t/recompiling-stale-cache-files/19381)

<div class="topic-metadata">

**Author:** [@maximilianpreisinger](https://discourse.julialang.org/u/maximilianpreisinger)\
**Replies:** 15\
**Last updated:** [November 27, 2019, 11:00am UTC](https://discourse.julialang.org/t/recompiling-stale-cache-files/19381 "2019-11-27T11:00:16Z")

</div>

Hello dear Julia users! I really like this language due to its speed and usability. However, a lot of times my modules are recompiling, which can take a long time when my script is starting. I read here and there some s…

---

## [I'm unable to use assertion](https://discourse.julialang.org/t/im-unable-to-use-assertion/31563)

<div class="topic-metadata">

**Author:** [@marouane1994](https://discourse.julialang.org/u/marouane1994)\
**Replies:** 5\
**Last updated:** [November 27, 2019, 8:55am UTC](https://discourse.julialang.org/t/im-unable-to-use-assertion/31563 "2019-11-27T08:55:21Z")

</div>

An AssertionError raises in my code, when i want to assert count(!iszero,\[1 3;2 2\])to be equal to zero: @assert count(!iszero,\[1 3;2 2\])==0 but, everytime i do that the error occurs. Perhaps i can do: a= count(!iszero,…

---

## [Codecov.submit() warning that coverage files do not exist in Travis CI](https://discourse.julialang.org/t/codecov-submit-warning-that-coverage-files-do-not-exist-in-travis-ci/31562)

<div class="topic-metadata">

**Author:** [@vlandau](https://discourse.julialang.org/u/vlandau)\
**Replies:** 2\
**Last updated:** [November 27, 2019, 7:50am UTC](https://discourse.julialang.org/t/codecov-submit-warning-that-coverage-files-do-not-exist-in-travis-ci/31562 "2019-11-27T07:50:56Z")

</div>

Hi All, I have travis CI set up with my Julia package, and suddenly coverage files are not being found when trying to submit coverage reports to codecov. As a consequnce, a 0% coverage statistic is being submitted to Co…

---

## [Can't update my package](https://discourse.julialang.org/t/cant-update-my-package/31536)

<div class="topic-metadata">

**Author:** [@marouane](https://discourse.julialang.org/u/marouane)\
**Replies:** 2\
**Last updated:** [November 27, 2019, 7:45am UTC](https://discourse.julialang.org/t/cant-update-my-package/31536 "2019-11-27T07:45:50Z")

</div>

i have this package on Github that i want to update after modifying simple things in it when i do (v1.2) pkg\> up QuantumRelayit starts to do the updationg operation but after a while it shows me the operation is timed ou…

---

## [How to get all the symbols within a module?](https://discourse.julialang.org/t/how-to-get-all-the-symbols-within-a-module/31539)

<div class="topic-metadata">

**Author:** [@Qiyamah](https://discourse.julialang.org/u/Qiyamah)\
**Replies:** 2\
**Last updated:** [November 27, 2019, 1:13am UTC](https://discourse.julialang.org/t/how-to-get-all-the-symbols-within-a-module/31539 "2019-11-27T01:13:24Z")

</div>

is there a way to list all the symbols in a module?

---

## [How to check whether 2 symbols are indeed pointing to the same object?](https://discourse.julialang.org/t/how-to-check-whether-2-symbols-are-indeed-pointing-to-the-same-object/31553)

<div class="topic-metadata">

**Author:** [@Qiyamah](https://discourse.julialang.org/u/Qiyamah)\
**Replies:** 6\
**Last updated:** [November 26, 2019, 11:17pm UTC](https://discourse.julialang.org/t/how-to-check-whether-2-symbols-are-indeed-pointing-to-the-same-object/31553 "2019-11-26T23:17:47Z")

</div>

julia\> struct MM x::Int end julia\> Base.:(==)(m1::MM,m2::MM) = m1.x == m2.x julia\> m1 = MM(3) MM(3) julia\> m2 = MM(3) MM(3) m1 == m2 #returns true I am looking for a way to check whether m1 and m2…

---

## [Cxx: calling icxx with a string interpolation results in a cryptic BoundsError](https://discourse.julialang.org/t/cxx-calling-icxx-with-a-string-interpolation-results-in-a-cryptic-boundserror/31508)

<div class="topic-metadata">

**Author:** [@GlenHenshaw](https://discourse.julialang.org/u/GlenHenshaw)\
**Replies:** 3\
**Last updated:** [November 26, 2019, 9:45pm UTC](https://discourse.julialang.org/t/cxx-calling-icxx-with-a-string-interpolation-results-in-a-cryptic-boundserror/31508 "2019-11-26T21:45:48Z")

</div>

This code used to work for me: foo = @cxxnew makefoo(); icxx"$foo-\>bar = 5;" But it now throws a rather cryptic error: ERROR: BoundsError: attempt to access 36-element Array{Tuple{AbstractString,Symbol,Int64,Int64,Boo…

---

## [Why mul! is so fast?](https://discourse.julialang.org/t/why-mul-is-so-fast/31436)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 7\
**Last updated:** [November 26, 2019, 8:17pm UTC](https://discourse.julialang.org/t/why-mul-is-so-fast/31436 "2019-11-26T20:17:19Z")

</div>

I wrote my own (simple) version of mul!, for comparison: function mymul!(y, A, x) y .= 0.0 @inbounds for j = 1:length(x) @simd for i = 1:length(y) y\[i\] += A\[i,j\] \* x\[j\] end end en…

---

## [Using Julia with Emacs under Cygwin](https://discourse.julialang.org/t/using-julia-with-emacs-under-cygwin/31547)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 0\
**Last updated:** [November 26, 2019, 8:16pm UTC](https://discourse.julialang.org/t/using-julia-with-emacs-under-cygwin/31547 "2019-11-26T20:16:36Z")

</div>

Using Emacs with Cygwin requires some careful configuration. On the other hand, I find it very useful to operate Emacs by voice. The combination of Emacs with Cygwin makes it possible. I am putting together a guide for …

---

## [Performance with small matrices: 5-argument mul! vs BLAS.gemm!](https://discourse.julialang.org/t/performance-with-small-matrices-5-argument-mul-vs-blas-gemm/31543)

<div class="topic-metadata">

**Author:** [@Egwene\_al\_Vere](https://discourse.julialang.org/u/Egwene_al_Vere)\
**Replies:** 1\
**Last updated:** [November 26, 2019, 7:26pm UTC](https://discourse.julialang.org/t/performance-with-small-matrices-5-argument-mul-vs-blas-gemm/31543 "2019-11-26T19:26:48Z")

</div>

Trying out the new 5-argument mul! introduced in Julia 1.3, (ABα+Cβ → C), for the calculation of matrix commutator comu(A,B)=AB-BA. From my testing, with small (2x2 or 3x3) matrices, mul! is actually faster than gemm!, a…

---

## [Can't Iterate on (::Task)](https://discourse.julialang.org/t/cant-iterate-on-task/31480)

<div class="topic-metadata">

**Author:** [@marouane1994](https://discourse.julialang.org/u/marouane1994)\
**Replies:** 2\
**Last updated:** [November 26, 2019, 6:56pm UTC](https://discourse.julialang.org/t/cant-iterate-on-task/31480 "2019-11-26T18:56:06Z")

</div>

i have a package built where i’m calling one function called prob with two methods inside a constructor called QRelaySampler and after i call it using QR=QRelaySampler(\[2 3;1 1\],1 ,1, 0.5) then QR.prob(200) it shows me …

---

## [Using connection pools in a websocket server with HTTP.jl](https://discourse.julialang.org/t/using-connection-pools-in-a-websocket-server-with-http-jl/31524)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 1\
**Last updated:** [November 26, 2019, 6:51pm UTC](https://discourse.julialang.org/t/using-connection-pools-in-a-websocket-server-with-http-jl/31524 "2019-11-26T18:51:06Z")

</div>

Hi all- I have two clients connected to a websocket server in HTTP.jl. I would like to do the following: send data from client 1 to the websocket server, process the data, send the processed data to client 2. Here is th…

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

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