# General Usage

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

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

**Page:** 944

---

## [Are there any 5-argument versions of \`mul!\` or similar in LinearAlgebra now?](https://discourse.julialang.org/t/are-there-any-5-argument-versions-of-mul-or-similar-in-linearalgebra-now/14585)

<div class="topic-metadata">

**Author:** [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Replies:** 1\
**Last updated:** [September 5, 2018, 4:37pm UTC](https://discourse.julialang.org/t/are-there-any-5-argument-versions-of-mul-or-similar-in-linearalgebra-now/14585 "2018-09-05T16:37:01Z")

</div>

The BLAS routines for multiplication and solving linear systems allow for scalar multipliers, usually written alpha and beta, so that the general mutating version of a matrix product is equivalent to C .= α .\* (A \* B) +…

---

## [Unable to use PkgDev with Julia 0.7.0-DEV](https://discourse.julialang.org/t/unable-to-use-pkgdev-with-julia-0-7-0-dev/9998)

<div class="topic-metadata">

**Author:** [@jandehaan](https://discourse.julialang.org/u/jandehaan)\
**Replies:** 18\
**Last updated:** [September 5, 2018, 2:51pm UTC](https://discourse.julialang.org/t/unable-to-use-pkgdev-with-julia-0-7-0-dev/9998 "2018-09-05T14:51:42Z")

</div>

I wanted to give Julia version 0.7 a try and update a package I developed as required. I got stuck rather quickly. #= Downloaded and installed Julia 0.7 Version 0.7.0-DEV.4690 (2018-03-23 22:25 UTC) Commit 78c7d87…

---

## [Simulate data for logistic regression](https://discourse.julialang.org/t/simulate-data-for-logistic-regression/14567)

<div class="topic-metadata">

**Author:** [@DominiqueMakowski](https://discourse.julialang.org/u/DominiqueMakowski)\
**Replies:** 3\
**Last updated:** [September 5, 2018, 1:37pm UTC](https://discourse.julialang.org/t/simulate-data-for-logistic-regression/14567 "2018-09-05T13:37:29Z")

</div>

After successfully implementing a small function to generate correlated data, I wish now to simulate data for logistic regression (with a 0/1 outcome) with specific coefficients. I’ve tried to follow two threads (origin…

---

## [How to implant Julia 1.0 code:Matrix{Vector{T}}(undef, M, N) in Julia 0.6?](https://discourse.julialang.org/t/how-to-implant-julia-1-0-code-matrix-vector-t-undef-m-n-in-julia-0-6/14559)

<div class="topic-metadata">

**Author:** [@complexfilter](https://discourse.julialang.org/u/complexfilter)\
**Replies:** 10\
**Last updated:** [September 5, 2018, 12:50pm UTC](https://discourse.julialang.org/t/how-to-implant-julia-1-0-code-matrix-vector-t-undef-m-n-in-julia-0-6/14559 "2018-09-05T12:50:41Z")

</div>

I wish to rewrite the following Julia 1.0 code patch = Matrix{Vector{T}}(undef, M, N) into Julia 0.6, since I want to take advantage of the high performance MKL in JuliaPro which only supports Julia 0.6. However, I ha…

---

## [Mac OS - Error with homebrew when trying to build package (HDF5/MAT)](https://discourse.julialang.org/t/mac-os-error-with-homebrew-when-trying-to-build-package-hdf5-mat/14541)

<div class="topic-metadata">

**Author:** [@hannaekfa](https://discourse.julialang.org/u/hannaekfa)\
**Replies:** 4\
**Last updated:** [September 5, 2018, 11:45am UTC](https://discourse.julialang.org/t/mac-os-error-with-homebrew-when-trying-to-build-package-hdf5-mat/14541 "2018-09-05T11:45:38Z")

</div>

Im trying to build the HDF5 and MAT package but get the error as in the picture. Im using Julia 0.6.4. The error seems to be related to homebrew. It just stops here, with ==\> make, and then nothing happens.

---

## [Undef for Array and SharedArray initialisation](https://discourse.julialang.org/t/undef-for-array-and-sharedarray-initialisation/14366)

<div class="topic-metadata">

**Author:** [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Replies:** 3\
**Last updated:** [September 5, 2018, 9:39am UTC](https://discourse.julialang.org/t/undef-for-array-and-sharedarray-initialisation/14366 "2018-09-05T09:39:58Z")

</div>

I feel like I’m a bit late to the party on this one but I’m only now getting around to updating some code originally written in Julia 0.3, and was surprised to see this: Array{Float64}(100) now raises a warning telling …

---

## [XML node element extraction based on context](https://discourse.julialang.org/t/xml-node-element-extraction-based-on-context/14565)

<div class="topic-metadata">

**Author:** [@Nakul\_Tiruviluamala](https://discourse.julialang.org/u/Nakul_Tiruviluamala)\
**Replies:** 2\
**Last updated:** [September 5, 2018, 5:53am UTC](https://discourse.julialang.org/t/xml-node-element-extraction-based-on-context/14565 "2018-09-05T05:53:54Z")

</div>

Hello, I am using LightXML to extract element nodes which pertain to musical parameters. I push the valuable elements to an array and then to a text file. Currently, I am struggling with how to exclude/include certain n…

---

## [Escaping in a macro](https://discourse.julialang.org/t/escaping-in-a-macro/14543)

<div class="topic-metadata">

**Author:** [@LaszloH](https://discourse.julialang.org/u/LaszloH)\
**Replies:** 25\
**Last updated:** [September 4, 2018, 11:17pm UTC](https://discourse.julialang.org/t/escaping-in-a-macro/14543 "2018-09-04T23:17:56Z")

</div>

In the documentation of Julia v1.0 there is almost nothing about escaping in a macro. I tried a simple debug function, which can be inserted at critical points of a function. It should print an expression or variable nam…

---

## [Help with adding dots to functions in an expression](https://discourse.julialang.org/t/help-with-adding-dots-to-functions-in-an-expression/14555)

<div class="topic-metadata">

**Author:** [@sarah-ji](https://discourse.julialang.org/u/sarah-ji)\
**Replies:** 1\
**Last updated:** [September 4, 2018, 10:35pm UTC](https://discourse.julialang.org/t/help-with-adding-dots-to-functions-in-an-expression/14555 "2018-09-04T22:35:56Z")

</div>

Hi, I am trying to distribute dots wherever necessary, so that I can apply an expression to a dataframe and evaluate it. say I give it the expression: My\_Expression = :(3 + log(x1) + 2 \* sqrt(abs(log(x2))) + asin(x4)) …

---

## [ImageView.jl compile, error](https://discourse.julialang.org/t/imageview-jl-compile-error/14494)

<div class="topic-metadata">

**Author:** [@zhangliye](https://discourse.julialang.org/u/zhangliye)\
**Replies:** 2\
**Last updated:** [September 4, 2018, 10:12pm UTC](https://discourse.julialang.org/t/imageview-jl-compile-error/14494 "2018-09-04T22:12:55Z")

</div>

Error when compiling ImageView.jl using Julia 0.6.4, Linux julia\> using ImageView INFO: Precompiling module ImageView. Failed to connect to Mir: Failed to connect to server socket: No such file or directory Unable t…

---

## [IJulia status for v. 0.7/1.0 on Windows 10?](https://discourse.julialang.org/t/ijulia-status-for-v-0-7-1-0-on-windows-10/13902)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 24\
**Last updated:** [September 4, 2018, 10:10pm UTC](https://discourse.julialang.org/t/ijulia-status-for-v-0-7-1-0-on-windows-10/13902 "2018-09-04T22:10:08Z")

</div>

Anyone knows the status of IJulia for Julia v.0.7/1.0 under Windows 10? I know this is an Issue for the IJulia package, and there is still activity on this in the Julia Observer section. I just updated Julia v.0.7 on my…

---

## [How to save Logging output to a log file?](https://discourse.julialang.org/t/how-to-save-logging-output-to-a-log-file/14004)

<div class="topic-metadata">

**Author:** [@Diego\_Javier\_Zea](https://discourse.julialang.org/u/Diego_Javier_Zea)\
**Replies:** 11\
**Last updated:** [September 4, 2018, 8:16pm UTC](https://discourse.julialang.org/t/how-to-save-logging-output-to-a-log-file/14004 "2018-09-04T20:16:37Z")

</div>

Hi! I would like to save the output of Julia 0.7 Logging macros @warn, @error, @debug and @info into a log file. How can I do that? Thanks in advance,

---

## [Package restricted to versions \*](https://discourse.julialang.org/t/package-restricted-to-versions/14539)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 2\
**Last updated:** [September 4, 2018, 6:43pm UTC](https://discourse.julialang.org/t/package-restricted-to-versions/14539 "2018-09-04T18:43:38Z")

</div>

I seem to have got into a mess with packages. Julia 1.0 and Windows 10 I opened an issue in the NamedTuples GitHub page, but just closed it. I am not sure which package is causing this problem. Yes, the text below indi…

---

## [I want to read xlsx documents. Should I use XLSX.jl, ExcelReaders.jl, Taro.jl, or XSLXReader.jl?](https://discourse.julialang.org/t/i-want-to-read-xlsx-documents-should-i-use-xlsx-jl-excelreaders-jl-taro-jl-or-xslxreader-jl/13776)

<div class="topic-metadata">

**Author:** [@galenlynch](https://discourse.julialang.org/u/galenlynch)\
**Replies:** 8\
**Last updated:** [September 4, 2018, 3:23pm UTC](https://discourse.julialang.org/t/i-want-to-read-xlsx-documents-should-i-use-xlsx-jl-excelreaders-jl-taro-jl-or-xslxreader-jl/13776 "2018-09-04T15:23:21Z")

</div>

There seems to be a bevy of excel packages in Julia. I see that Taro and ExcelReaders use different libraries, but I’m having a hard time distinguishing and choosing between all these packages. I see that ExcelFiles.jl a…

---

## [FAQ: ReinterpretArray vs unsafe\_wrap](https://discourse.julialang.org/t/faq-reinterpretarray-vs-unsafe-wrap/14412)

<div class="topic-metadata">

**Author:** [@foobar\_lv2](https://discourse.julialang.org/u/foobar_lv2)\
**Replies:** 2\
**Last updated:** [September 4, 2018, 2:55pm UTC](https://discourse.julialang.org/t/faq-reinterpretarray-vs-unsafe-wrap/14412 "2018-09-04T14:55:28Z")

</div>

There were a lot of questions and discussions about reinterpret vs unsafe\_wrap since the new reinterpret arrived in 0.7, so I thought to make a thread to collect some of the answers and hopefully get some authoritative a…

---

## [Pkg3 - how to add dependencies for development only](https://discourse.julialang.org/t/pkg3-how-to-add-dependencies-for-development-only/14508)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 6\
**Last updated:** [September 4, 2018, 2:08pm UTC](https://discourse.julialang.org/t/pkg3-how-to-add-dependencies-for-development-only/14508 "2018-09-04T14:08:52Z")

</div>

I’d like to use Revise/Rebugger/BenchmarkTools/Plots/etc. when developing a package but if I just add them as usual they go to Project.toml and Manifest.toml. They are not real dependencies but rather convenience tools …

---

## [List of 1.0 Compatible Packages?](https://discourse.julialang.org/t/list-of-1-0-compatible-packages/13264)

<div class="topic-metadata">

**Author:** [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Replies:** 6\
**Last updated:** [September 4, 2018, 11:44am UTC](https://discourse.julialang.org/t/list-of-1-0-compatible-packages/13264 "2018-09-04T11:44:11Z")

</div>

I just tried Optim.jl, but it dies because it uses @printf. I assume this is because it has not been updated to 1.0 yet. I think Pkg installs all packages from the julia repository, regardless of whether they have been…

---

## [What is the status of Julia's interactive debugging?](https://discourse.julialang.org/t/what-is-the-status-of-julias-interactive-debugging/14528)

<div class="topic-metadata">

**Author:** [@AdamR](https://discourse.julialang.org/u/AdamR)\
**Replies:** 1\
**Last updated:** [September 4, 2018, 10:48am UTC](https://discourse.julialang.org/t/what-is-the-status-of-julias-interactive-debugging/14528 "2018-09-04T10:48:24Z")

</div>

I am waiting impatiently for an interactive debugger for Julia. Is this functionality lay somewhere hidden in the roadmap? ref: https://github.com/Keno/Gallium.jl/issues/199

---

## [Error building PyCall in 0.7.0](https://discourse.julialang.org/t/error-building-pycall-in-0-7-0/14526)

<div class="topic-metadata">

**Author:** [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)\
**Replies:** 3\
**Last updated:** [September 4, 2018, 10:21am UTC](https://discourse.julialang.org/t/error-building-pycall-in-0-7-0/14526 "2018-09-04T10:21:56Z")

</div>

Hi, following the 0.6.4 → 1.0 route, today I’ve tried to install 0.7 on my ubuntu mate 16.04 box. Needless to say, everything was working fine before doing that. The fact is that installation went ok, but problems aris…

---

## [Code coverage works poorly in Julia 0.7](https://discourse.julialang.org/t/code-coverage-works-poorly-in-julia-0-7/14522)

<div class="topic-metadata">

**Author:** [@bennedich](https://discourse.julialang.org/u/bennedich)\
**Replies:** 1\
**Last updated:** [September 4, 2018, 9:43am UTC](https://discourse.julialang.org/t/code-coverage-works-poorly-in-julia-0-7/14522 "2018-09-04T09:43:59Z")

</div>

As we upgraded from Julia 0.6 to Julia 0.7, our code test coverage jumped from 73% to 87%. Looking more closely at the coverage report, it is now very inaccurate. Lines are missed, or counted double. Entire functions and…

---

## [Mean and empty collection](https://discourse.julialang.org/t/mean-and-empty-collection/14496)

<div class="topic-metadata">

**Author:** [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Replies:** 3\
**Last updated:** [September 4, 2018, 7:41am UTC](https://discourse.julialang.org/t/mean-and-empty-collection/14496 "2018-09-04T07:41:31Z")

</div>

mean behaves very inconsistently with empty collections, is this intentional? julia\> y = Union{Missing, Float64}\[missing, missing, missing\] julia\> mean(skipmissing(y)) ERROR: ArgumentError: mean of empty collection und…

---

## [How do I determine the memory allocations in Julia using @code\_typed (or @code\_llvm)](https://discourse.julialang.org/t/how-do-i-determine-the-memory-allocations-in-julia-using-code-typed-or-code-llvm/14510)

<div class="topic-metadata">

**Author:** [@affans](https://discourse.julialang.org/u/affans)\
**Replies:** 4\
**Last updated:** [September 4, 2018, 7:33am UTC](https://discourse.julialang.org/t/how-do-i-determine-the-memory-allocations-in-julia-using-code-typed-or-code-llvm/14510 "2018-09-04T07:33:08Z")

</div>

I am looking for a basic understanding of how allocations “work” in Julia. See this code (obtained from another post I was reading). function sum\_of\_diff\_1(x) sum(diff(x)) end A vectorized version of the su…

---

## [How do I combine tuples?](https://discourse.julialang.org/t/how-do-i-combine-tuples/14509)

<div class="topic-metadata">

**Author:** [@LeoK987](https://discourse.julialang.org/u/LeoK987)\
**Replies:** 1\
**Last updated:** [September 4, 2018, 12:32am UTC](https://discourse.julialang.org/t/how-do-i-combine-tuples/14509 "2018-09-04T00:32:09Z")

</div>

julia\> AT = ((1,2), (2,3)) ((1, 2), (2, 3)) julia\> ct = (3,4) (3, 4) julia\> (AT, ct) (((1, 2), (2, 3)), (3, 4)) julia\> (AT; ct) (3, 4) Is there a way to get ((1, 2), (2, 3), (3, 4))

---

## [How to optimise and be faster than Java?](https://discourse.julialang.org/t/how-to-optimise-and-be-faster-than-java/14457)

<div class="topic-metadata">

**Author:** [@Plamen](https://discourse.julialang.org/u/Plamen)\
**Replies:** 24\
**Last updated:** [September 4, 2018, 12:21am UTC](https://discourse.julialang.org/t/how-to-optimise-and-be-faster-than-java/14457 "2018-09-04T00:21:53Z")

</div>

Hello all I am new to Julia and I try to port something from Java to Julia (in the hope that I would get substantial speedup). The application essentially reads some files with parameters and projects some bond prices o…

---

## [Unit tests for packages that use random number generation that are robust to version changes](https://discourse.julialang.org/t/unit-tests-for-packages-that-use-random-number-generation-that-are-robust-to-version-changes/14477)

<div class="topic-metadata">

**Author:** [@colintbowers](https://discourse.julialang.org/u/colintbowers)\
**Replies:** 4\
**Last updated:** [September 3, 2018, 10:44pm UTC](https://discourse.julialang.org/t/unit-tests-for-packages-that-use-random-number-generation-that-are-robust-to-version-changes/14477 "2018-09-03T22:44:20Z")

</div>

Hi all, I just got caught out by the change in rand and MersenneTwister between v0.6 and v0.7 (my own fault - I didn’t read the release notes carefully enough). However, this raised a deeper issue for me. If one has a …

---

## [Log scale error with Plots/PyPlot in 0.7](https://discourse.julialang.org/t/log-scale-error-with-plots-pyplot-in-0-7/14502)

<div class="topic-metadata">

**Author:** [@gideonsimpson](https://discourse.julialang.org/u/gideonsimpson)\
**Replies:** 0\
**Last updated:** [September 3, 2018, 9:28pm UTC](https://discourse.julialang.org/t/log-scale-error-with-plots-pyplot-in-0-7/14502 "2018-09-03T21:28:19Z")

</div>

In 0.7, if I try commands like using Plots; pyplot() x = range(1,length=100,stop=100) y = x.^2; plot(x,y, xscale=:log10) I get the error: UndefVarError: latexstring not defined Stacktrace: \[1\] (::getfield(Plots, Sym…

---

## [Loading packages without UUID](https://discourse.julialang.org/t/loading-packages-without-uuid/14448)

<div class="topic-metadata">

**Author:** [@lostella](https://discourse.julialang.org/u/lostella)\
**Replies:** 2\
**Last updated:** [September 3, 2018, 8:22pm UTC](https://discourse.julialang.org/t/loading-packages-without-uuid/14448 "2018-09-03T20:22:08Z")

</div>

Hi everyone. In the documentation for Pkg it is mentioned that: For legacy reasons it is possible to load a package without a project file or UUID from the REPL or the top-level of a script. It is not possible, however,…

---

## [Hard to find bug in julia 1.0.0](https://discourse.julialang.org/t/hard-to-find-bug-in-julia-1-0-0/14404)

<div class="topic-metadata">

**Author:** [@Jean\_Michel](https://discourse.julialang.org/u/Jean_Michel)\
**Replies:** 10\
**Last updated:** [September 3, 2018, 8:05pm UTC](https://discourse.julialang.org/t/hard-to-find-bug-in-julia-1-0-0/14404 "2018-09-03T20:05:39Z")

</div>

I ported a rather large module called Tbl from julia 0.6 to 1.0, verifying step by step that everything works, which it does. However, when using Tbl after it has been modified in any way in a new julia session, I get an…

---

## [NamedTuples and dependent packages](https://discourse.julialang.org/t/namedtuples-and-dependent-packages/14493)

<div class="topic-metadata">

**Author:** [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Replies:** 2\
**Last updated:** [September 3, 2018, 6:41pm UTC](https://discourse.julialang.org/t/namedtuples-and-dependent-packages/14493 "2018-09-03T18:41:08Z")

</div>

is this my installation problem, or common? julia\> Pkg.add("NamedTuples") Resolving package versions... ERROR: Unsatisfiable requirements detected for package NamedTuples \[73a701b4\]: NamedTuples \[73a701b4\] log: ├─pos…

---

## [Recursive multithreading](https://discourse.julialang.org/t/recursive-multithreading/14489)

<div class="topic-metadata">

**Author:** [@foobar\_lv2](https://discourse.julialang.org/u/foobar_lv2)\
**Replies:** 2\
**Last updated:** [September 3, 2018, 4:57pm UTC](https://discourse.julialang.org/t/recursive-multithreading/14489 "2018-09-03T16:57:00Z")

</div>

I want to parallelize an algorithm on trees. This should be pretty easy in principle: At each step, I can split into two subproblems that can be handled independently (inplace). Unfortunately I always get only two thread…

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

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