# General Usage

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

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

**Page:** 981

---

## [Strided addition on 2 arrays in place](https://discourse.julialang.org/t/strided-addition-on-2-arrays-in-place/10713)

<div class="topic-metadata">

**Author:** [@lcambier](https://discourse.julialang.org/u/lcambier)\
**Replies:** 2\
**Last updated:** [May 4, 2018, 6:58pm UTC](https://discourse.julialang.org/t/strided-addition-on-2-arrays-in-place/10713 "2018-05-04T18:58:48Z")

</div>

Hi, I have this simple code to add part of an array (contiguous rows / some columns) into another arrays (some rows / some columns). The first array is stored as a long vector so some reshape & other are necessary. In p…

---

## [Adapting automatic differentiation to functions with user-defined type argument](https://discourse.julialang.org/t/adapting-automatic-differentiation-to-functions-with-user-defined-type-argument/10707)

<div class="topic-metadata">

**Author:** [@plapplop](https://discourse.julialang.org/u/plapplop)\
**Replies:** 3\
**Last updated:** [May 4, 2018, 7:26pm UTC](https://discourse.julialang.org/t/adapting-automatic-differentiation-to-functions-with-user-defined-type-argument/10707 "2018-05-04T19:26:13Z")

</div>

I’m using my own module where models can be summarized to be functions y = f(θ) depending on parameters θ, the latter being defined as a specific type P. I can’t change that without rewriting the whole module, which I ca…

---

## [Struggling with meta programming](https://discourse.julialang.org/t/struggling-with-meta-programming/10709)

<div class="topic-metadata">

**Author:** [@GlenHenshaw](https://discourse.julialang.org/u/GlenHenshaw)\
**Replies:** 2\
**Last updated:** [May 4, 2018, 6:38pm UTC](https://discourse.julialang.org/t/struggling-with-meta-programming/10709 "2018-05-04T18:38:49Z")

</div>

Hi all, I’m attempting to teach myself how to do Julia meta programming. My current exercise is to write a macro that produces a variant of zip, in that you give it a single dimensional array, and it returns an iterator…

---

## [How to print a formatted number with colors?](https://discourse.julialang.org/t/how-to-print-a-formatted-number-with-colors/10710)

<div class="topic-metadata">

**Author:** [@RaulDurand](https://discourse.julialang.org/u/RaulDurand)\
**Replies:** 2\
**Last updated:** [May 4, 2018, 6:23pm UTC](https://discourse.julialang.org/t/how-to-print-a-formatted-number-with-colors/10710 "2018-05-04T18:23:19Z")

</div>

Is there a way to use @printf with colors or print\_with\_color with format?

---

## [StridedMatrix? Hermitian and SymTridiagonal for LinAlg](https://discourse.julialang.org/t/stridedmatrix-hermitian-and-symtridiagonal-for-linalg/10698)

<div class="topic-metadata">

**Author:** [@Iagoba\_Apellaniz](https://discourse.julialang.org/u/Iagoba_Apellaniz)\
**Replies:** 2\
**Last updated:** [May 4, 2018, 2:26pm UTC](https://discourse.julialang.org/t/stridedmatrix-hermitian-and-symtridiagonal-for-linalg/10698 "2018-05-04T14:26:52Z")

</div>

Julia V0.6.2 Is this a bug? Am I using these type wrappers properly? julia\> A = Hermitian(SymTridiagonal(\[1, 2, 3\], \[1im, 2im\])); julia\> eigfact(A) ERROR: MethodError: no method matching eigfact!(::Hermitian{Complex{F…

---

## [Error locations for longer IJulia Cells](https://discourse.julialang.org/t/error-locations-for-longer-ijulia-cells/10688)

<div class="topic-metadata">

**Author:** [@habemus-papadum](https://discourse.julialang.org/u/habemus-papadum)\
**Replies:** 2\
**Last updated:** [May 4, 2018, 11:34am UTC](https://discourse.julialang.org/t/error-locations-for-longer-ijulia-cells/10688 "2018-05-04T11:34:23Z")

</div>

Hi – If I have an error in a relatively long IJulia cell, IJulia correctly describes the error, but does not specify the location: In\[1\]: x = 2 y = 3 z = not\_defined a = 4 b = 5 output: UndefVarError: not\_defined not …

---

## [CSV.jl open file error, contain data in scientific notation format](https://discourse.julialang.org/t/csv-jl-open-file-error-contain-data-in-scientific-notation-format/10694)

<div class="topic-metadata">

**Author:** [@zhangliye](https://discourse.julialang.org/u/zhangliye)\
**Replies:** 4\
**Last updated:** [May 4, 2018, 10:52am UTC](https://discourse.julialang.org/t/csv-jl-open-file-error-contain-data-in-scientific-notation-format/10694 "2018-05-04T10:52:43Z")

</div>

When I open the CSV file containing integer file in the scientific notation format, such as 2e2 for the integer 200. When I use CSV.jl to open this file, I got the following error. CSV.ParsingException(“error parsing …

---

## [Craig-Bampton method on large problems](https://discourse.julialang.org/t/craig-bampton-method-on-large-problems/10696)

<div class="topic-metadata">

**Author:** [@mrapo](https://discourse.julialang.org/u/mrapo)\
**Replies:** 1\
**Last updated:** [May 4, 2018, 10:41am UTC](https://discourse.julialang.org/t/craig-bampton-method-on-large-problems/10696 "2018-05-04T10:41:32Z")

</div>

I’ve implemented the Craig-Bampton method for model reduction at https://github.com/JuliaFEM/ModelReduction.jl/blob/master/src/craig\_bampton.jl. Now I would like to perform the reduction on very large models (at least 1 …

---

## [\[Pkg3\] Is there any way to install packages "globally"](https://discourse.julialang.org/t/pkg3-is-there-any-way-to-install-packages-globally/10687)

<div class="topic-metadata">

**Author:** [@Iagoba\_Apellaniz](https://discourse.julialang.org/u/Iagoba_Apellaniz)\
**Replies:** 3\
**Last updated:** [May 4, 2018, 9:33am UTC](https://discourse.julialang.org/t/pkg3-is-there-any-way-to-install-packages-globally/10687 "2018-05-04T09:33:21Z")

</div>

I’m not sure how to install some package and make it available globally. I mean, that I understand that inside some folder with some project.tolm only packages registered on that file should be available (in principle. T…

---

## [Best way to implement +(x::Float32,y::Float32) in 2 different modules?](https://discourse.julialang.org/t/best-way-to-implement-x-float32-y-float32-in-2-different-modules/10654)

<div class="topic-metadata">

**Author:** [@Qiyamah](https://discourse.julialang.org/u/Qiyamah)\
**Replies:** 20\
**Last updated:** [May 4, 2018, 2:40am UTC](https://discourse.julialang.org/t/best-way-to-implement-x-float32-y-float32-in-2-different-modules/10654 "2018-05-04T02:40:09Z")

</div>

Hi, I want to implement Base.+(x::Float32,y::Float32) differently in module A, and module B. In module C, depending on which module (A or B) I use,I want the proper + function to be called (the one in A or B)? Is …

---

## [Better performance to blockwise matrix multiplication](https://discourse.julialang.org/t/better-performance-to-blockwise-matrix-multiplication/10677)

<div class="topic-metadata">

**Author:** [@mrapo](https://discourse.julialang.org/u/mrapo)\
**Replies:** 2\
**Last updated:** [May 3, 2018, 9:55am UTC](https://discourse.julialang.org/t/better-performance-to-blockwise-matrix-multiplication/10677 "2018-05-03T09:55:33Z")

</div>

The following function makes it possible to perform blockwise matrix multiplication that results in a very large matrix. Basically the arrays are sliced into smaller blocks which are then multiplied and the final matrix …

---

## [Native Julia gemm implementation](https://discourse.julialang.org/t/native-julia-gemm-implementation/10615)

<div class="topic-metadata">

**Author:** [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Replies:** 16\
**Last updated:** [May 3, 2018, 8:06am UTC](https://discourse.julialang.org/t/native-julia-gemm-implementation/10615 "2018-05-03T08:06:43Z")

</div>

Hi, I continue my Julia exploration and I am very impressed by the performance and the expressiveness of the language. The generated binary code looks very good and the SIMD instructions are efficiently used. Does anyo…

---

## ["écru", what working with this ? ERROR: UnicodeError: invalid character index 2 (0xa9 is a continuation byte)](https://discourse.julialang.org/t/ecru-what-working-with-this-error-unicodeerror-invalid-character-index-2-0xa9-is-a-continuation-byte/9056)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 16\
**Last updated:** [May 2, 2018, 10:42pm UTC](https://discourse.julialang.org/t/ecru-what-working-with-this-error-unicodeerror-invalid-character-index-2-0xa9-is-a-continuation-byte/9056 "2018-05-02T22:42:45Z")

</div>

data reading by a=readdlm(“file.txt”,‘;’,String), file Unicode UTF8 julia\> (slow\[4743516,1\]) “écru” julia\> length(slow\[4743516,1\]) 4 julia\> slow\[4743516,1\]\[1\] ‘é’: Unicode U+00e9 (category Ll: Letter, lowercase) j…

---

## [Strange inference problem in v0.6.2](https://discourse.julialang.org/t/strange-inference-problem-in-v0-6-2/10662)

<div class="topic-metadata">

**Author:** [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)\
**Replies:** 0\
**Last updated:** [May 2, 2018, 6:13pm UTC](https://discourse.julialang.org/t/strange-inference-problem-in-v0-6-2/10662 "2018-05-02T18:13:33Z")

</div>

I have been running into a very strange bug, only on v0.6.2. This code has worked in the past, but apparently some of the changes to make things more generic, and handle conversions to substring types, may have provoked…

---

## [Cumsum and TiledIteration](https://discourse.julialang.org/t/cumsum-and-tilediteration/10656)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 1\
**Last updated:** [May 2, 2018, 3:18pm UTC](https://discourse.julialang.org/t/cumsum-and-tilediteration/10656 "2018-05-02T15:18:53Z")

</div>

In a mailing list in another galaxy, far far away, someone posted a question regarding taking the cumulative sum along the axes of a 3 dimensional array. Julia has the cumsum function for this. I am asking myself if …

---

## [Differential equations not working with julia 0.6.2](https://discourse.julialang.org/t/differential-equations-not-working-with-julia-0-6-2/10648)

<div class="topic-metadata">

**Author:** [@Frenzee](https://discourse.julialang.org/u/Frenzee)\
**Replies:** 2\
**Last updated:** [May 2, 2018, 2:27pm UTC](https://discourse.julialang.org/t/differential-equations-not-working-with-julia-0-6-2/10648 "2018-05-02T14:27:16Z")

</div>

I have tried numerous times to run: using Differential Equations in on both my ubuntu laptop and windows 7 computer and I get errors saying sundials could not be installed and a message saying that DifferentialEquations.…

---

## [How to utilize all cores when operating on large matrices](https://discourse.julialang.org/t/how-to-utilize-all-cores-when-operating-on-large-matrices/10650)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 4\
**Last updated:** [May 2, 2018, 11:58am UTC](https://discourse.julialang.org/t/how-to-utilize-all-cores-when-operating-on-large-matrices/10650 "2018-05-02T11:58:16Z")

</div>

I have a relatively large matrix (approximate size 50000x50000) that I need to bulk divide by numbers in a separate matrix of the same shape. The code does something simple like V = A ./ B It seems to utilize only a s…

---

## [Ordering the y-axis values in a dotplot](https://discourse.julialang.org/t/ordering-the-y-axis-values-in-a-dotplot/10642)

<div class="topic-metadata">

**Author:** [@lyonsquark](https://discourse.julialang.org/u/lyonsquark)\
**Replies:** 9\
**Last updated:** [May 2, 2018, 11:05am UTC](https://discourse.julialang.org/t/ordering-the-y-axis-values-in-a-dotplot/10642 "2018-05-02T11:05:37Z")

</div>

Hi, I’m trying to make a “dotplot”, e.g. see here, with Plots.jl. It mostly works, but I would like to order the categorical values that are shown on the y-axis. Here is what I have so far, It is produced by @df d2d…

---

## [How to make SIMD work?](https://discourse.julialang.org/t/how-to-make-simd-work/10646)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 3\
**Last updated:** [May 2, 2018, 9:20am UTC](https://discourse.julialang.org/t/how-to-make-simd-work/10646 "2018-05-02T09:20:19Z")

</div>

I’m trying follow this Demystifying Auto-Vectorization in Julia blog post. I couldn’t see the nice vaddpd instructions, however. Is there something that I need to do to enable SIMD? The E5-2699 v4 processor supports A…

---

## [Dimension Reduction](https://discourse.julialang.org/t/dimension-reduction/10649)

<div class="topic-metadata">

**Author:** [@Samudra](https://discourse.julialang.org/u/Samudra)\
**Replies:** 2\
**Last updated:** [May 2, 2018, 5:40am UTC](https://discourse.julialang.org/t/dimension-reduction/10649 "2018-05-02T05:40:42Z")

</div>

Hi, Is anyone knows whether Julia has a package or library for ‘Multidimensional Scaling’? I checked inside multivariate statistics, but it doesn’t contain that. cheers /Samudra

---

## [IJulia graphics not rendering on different computer](https://discourse.julialang.org/t/ijulia-graphics-not-rendering-on-different-computer/10639)

<div class="topic-metadata">

**Author:** [@brossetti](https://discourse.julialang.org/u/brossetti)\
**Replies:** 3\
**Last updated:** [May 1, 2018, 7:52pm UTC](https://discourse.julialang.org/t/ijulia-graphics-not-rendering-on-different-computer/10639 "2018-05-01T19:52:47Z")

</div>

If I create a jupyter notebook file on Computer A (Mac OSX; Julia 0.6.2; IJulia 1.8.0) with output that contains images (using Images) and plots (using Plots; gr();), I can’t seem to get the graphics to render when I ope…

---

## [Compiling Julia from source](https://discourse.julialang.org/t/compiling-julia-from-source/10499)

<div class="topic-metadata">

**Author:** [@Snir\_Gazit](https://discourse.julialang.org/u/Snir_Gazit)\
**Replies:** 9\
**Last updated:** [May 1, 2018, 5:15pm UTC](https://discourse.julialang.org/t/compiling-julia-from-source/10499 "2018-05-01T17:15:25Z")

</div>

As the title suggests, I am trying to compile Julia (v0.6.2) from source (to enable MKL support) Unfortunately, I get the following error: curl: (7) Failed to connect to ftp.csx.cam.ac.uk port 443:Connection refused D…

---

## [Any way to make this one-liner type stable?](https://discourse.julialang.org/t/any-way-to-make-this-one-liner-type-stable/10636)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 2\
**Last updated:** [May 1, 2018, 1:40pm UTC](https://discourse.julialang.org/t/any-way-to-make-this-one-liner-type-stable/10636 "2018-05-01T13:40:42Z")

</div>

I’ve got this function which widens each of the arguments of a Tuple type widen\_tupleargs(::Type{T}) where {T\<:Tuple} = Tuple{map(widen,T.parameters)...} e.g. julia\> widen\_tupleargs(Tuple{Int16,Float16}) Tuple{Int32,F…

---

## [Impossible Raw String Encoding?](https://discourse.julialang.org/t/impossible-raw-string-encoding/9493)

<div class="topic-metadata">

**Author:** [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Replies:** 14\
**Last updated:** [May 1, 2018, 7:49am UTC](https://discourse.julialang.org/t/impossible-raw-string-encoding/9493 "2018-05-01T07:49:41Z")

</div>

dear julia experts— is it impossible to encode a quoted quote into a raw string? For example, ("\\"abcd\\"") contains two of them: println("WANTED: (\\"\\\\\\"abcd\\\\\\"\\")") println(raw"NO: (\\"\\"abcd\\\\\\")") WANTED: ("\\"abcd\\…

---

## [Finding the set of keys with the same value in a Dictionnary](https://discourse.julialang.org/t/finding-the-set-of-keys-with-the-same-value-in-a-dictionnary/10578)

<div class="topic-metadata">

**Author:** [@jayce\_ram](https://discourse.julialang.org/u/jayce_ram)\
**Replies:** 10\
**Last updated:** [April 30, 2018, 1:10pm UTC](https://discourse.julialang.org/t/finding-the-set-of-keys-with-the-same-value-in-a-dictionnary/10578 "2018-04-30T13:10:40Z")

</div>

Hello, I know that a dictionary is not intended to be used this way but I’d like to know if it exists some function that allows me to get all the keys that have the same value in a dict. For example : d = Dict( "dinner …

---

## [Request guidance in optimising the performance of my implementation (running time and allocation)](https://discourse.julialang.org/t/request-guidance-in-optimising-the-performance-of-my-implementation-running-time-and-allocation/10528)

<div class="topic-metadata">

**Author:** [@zygmuntszpak](https://discourse.julialang.org/u/zygmuntszpak)\
**Replies:** 9\
**Last updated:** [April 30, 2018, 11:57am UTC](https://discourse.julialang.org/t/request-guidance-in-optimising-the-performance-of-my-implementation-running-time-and-allocation/10528 "2018-04-30T11:57:29Z")

</div>

I suspect that it is possible for further improve upon my implementation of a particular cost function, but I’m not sure how to proceed further. The cost function involves summing the result of a series of matrix and vec…

---

## [Package name suggestions](https://discourse.julialang.org/t/package-name-suggestions/10596)

<div class="topic-metadata">

**Author:** [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Replies:** 2\
**Last updated:** [April 29, 2018, 4:24pm UTC](https://discourse.julialang.org/t/package-name-suggestions/10596 "2018-04-29T16:24:44Z")

</div>

Hi guys! I am about to release a toolbox created at INPE for Julia that has many functions related to Satellite analysis. The plan is to transform this in a “official” Julia package. However, to do so, I need to also ma…

---

## [Ambiguity on Vector{\<:Abstract\*}?](https://discourse.julialang.org/t/ambiguity-on-vector-abstract/10586)

<div class="topic-metadata">

**Author:** [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Replies:** 11\
**Last updated:** [April 28, 2018, 4:59pm UTC](https://discourse.julialang.org/t/ambiguity-on-vector-abstract/10586 "2018-04-28T16:59:45Z")

</div>

this may fit better in development than first steps, but before I bother the developers, let me ask the basics? would it introduce any ambiguity if Vector{AbstractFloat} was interpreted as Vector{\<:AbstractFloat}. The …

---

## [Compiled sprintf?](https://discourse.julialang.org/t/compiled-sprintf/10580)

<div class="topic-metadata">

**Author:** [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Replies:** 3\
**Last updated:** [April 28, 2018, 3:09am UTC](https://discourse.julialang.org/t/compiled-sprintf/10580 "2018-04-28T03:09:57Z")

</div>

does julia have a non-macro sprintf? how would one write f(x::AbstractFloat, fmt="%7.4f")= @sprintf(fmt, x) short of writing everything in macro rather than in julia? regards, /iaw

---

## [Removing versions from Documenter.jl generated documentation](https://discourse.julialang.org/t/removing-versions-from-documenter-jl-generated-documentation/10579)

<div class="topic-metadata">

**Author:** [@atteson](https://discourse.julialang.org/u/atteson)\
**Replies:** 2\
**Last updated:** [April 27, 2018, 10:15pm UTC](https://discourse.julialang.org/t/removing-versions-from-documenter-jl-generated-documentation/10579 "2018-04-27T22:15:38Z")

</div>

I’ve (finally) gotten Documenter.jl working to create and deploy documentation for my first julia model. It is creating documentation for some old versions of my module that I don’t want to appear in the list of documen…

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

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