From c899d80e08b88abcf14717bc502944f516829e11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bogumi=C5=82=20Kami=C5=84ski?= Date: Thu, 29 Oct 2020 23:24:32 +0100 Subject: [PATCH] Make a docstring of PooledArray more precise --- src/PooledArrays.jl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/PooledArrays.jl b/src/PooledArrays.jl index 30f1753..0d93e8d 100644 --- a/src/PooledArrays.jl +++ b/src/PooledArrays.jl @@ -104,9 +104,11 @@ _widen(::Type{UInt32}) = UInt64 """ PooledArray(array, [reftype]) -Convert the given array to a PooledArray where each element will be referenced -as an integer of the given type. If no `reftype` is specified one is chosen -automatically based on the number of unique elements. +Freshly allocate `PooledArray` using the given array as a source where each +element will be referenced as an integer of the given type. +If no `reftype` is specified one is chosen automatically based on the number of unique elements. +If `array` is not a `PooledArray` then the order of elements in `refpool` in the resulting +`PooledArray` is the order of first appereance of elements in `array`. """ PooledArray