On 1/9/2016 4:58 AM, Stefan Otte wrote:
> Hey,
>
> one of my new year's resolutions is to get my pull requests
> accepted (or closed). So here we go...
>
> Here is the update pull request:
> https://github.com/numpy/numpy/pull/5057 Here is the docstring:
> https://github.com/sotte/numpy/commit/
Hey,
one of my new year's resolutions is to get my pull requests accepted (or
closed). So here we go...
Here is the update pull request: https://github.com/numpy/numpy/pull/5057
Here is the docstring:
https://github.com/sotte/numpy/commit/3d4c5d19a8f15b35df50d945b9c8853b683f7ab6#diff-2270128d50ff
Hey,
Just a quick update. I updated the pull request and renamed `stack` into
`block`. Have a look: https://github.com/numpy/numpy/pull/5057
I'm sticking with simple initial implementation because it's simple and
does what you think it does.
Cheers,
Stefan
On Fri, Oct 31, 2014 at 2:13 PM Ste
To make the last point more concrete the implementation could look
something like this (note that I didn't test it and that it still
takes some work):
def bmat(obj, ldict=None, gdict=None):
return matrix(stack(obj, ldict, gdict))
def stack(obj, ldict=None, gdict=None):
# the old bmat co
Hey,
there are several ways how to proceed.
- My proposed solution covers the 80% case quite well (at least I use
it all the time). I'd convert the doctests into unittests and we're
done.
- We could slightly change the interface to leave out the surrounding
square brackets, i.e. turning `stack([
On 28 Oct 2014 18:34, "Stefan Otte" wrote:
>
> Hey,
>
> In the last weeks I tested `np.asarray(np.bmat())` as `stack`
> function and it works quite well. So the question persits: If `bmat`
> already offers something like `stack` should we even bother
> implementing `stack`? More code leads to
Hey,
In the last weeks I tested `np.asarray(np.bmat())` as `stack`
function and it works quite well. So the question persits: If `bmat`
already offers something like `stack` should we even bother
implementing `stack`? More code leads to more
bugs and maintenance work. (However, the current im
Hey Ben,
Side note: I've had to do the same thing for stitching curvilinear model
grid coordinates together. Usings pandas DataFrames indexed by `i` and `j`
is really good for this. You can offset the indices directly, unstack the
DF, and the pandas will align for you.
Happy to send an example al
On Tue, Sep 9, 2014 at 8:30 AM, wrote:
>
>
>
> On Tue, Sep 9, 2014 at 5:42 AM, Stefan Otte wrote:
>
>> Hey,
>>
>> @Josef, I wasn't aware of `bmat` and `np.asarray(np.bmat())` does
>> basically what I want and what I'm already using.
>>
>
> I never needed any tetris or anything similar except
On Tue, Sep 9, 2014 at 5:42 AM, Stefan Otte wrote:
> Hey,
>
> @Josef, I wasn't aware of `bmat` and `np.asarray(np.bmat())` does
> basically what I want and what I'm already using.
>
I never needed any tetris or anything similar except for the matched block
version.
Just to point out two mor
Hey,
@Josef, I wasn't aware of `bmat` and `np.asarray(np.bmat())` does
basically what I want and what I'm already using.
Regarding the Tetris problem: that never happened to me, but stack, as
Josef pointed out, can handle that already :)
I like the idea of removing the redundant square brack
On 08-Sep-14 4:40 PM, Joseph Martinot-Lagarde wrote:
> Le 08/09/2014 15:29, Stefan Otte a écrit :
>> Hey,
>>
>> quite often I work with block matrices. Matlab offers the convenient notation
>>
>> [ a b; c d ]
This would appear to be a desirable way to go.
Numpy has something similar for str
Le 08/09/2014 15:29, Stefan Otte a écrit :
> Hey,
>
> quite often I work with block matrices. Matlab offers the convenient notation
>
> [ a b; c d ]
>
> to stack matrices. The numpy equivalent is kinda clumsy:
>
> vstack([hstack([a,b]), hstack([c,d])])
>
> I wrote the little function `stack` t
Le 08/09/2014 16:41, Sturla Molden a écrit :
> Stefan Otte wrote:
>
>> stack([[a, b], [c, d]])
>>
>> In my case `stack` replaced `hstack` and `vstack` almost completely.
>>
>> If you're interested in including it in numpy I created a pull request
>> [1]. I'm looking forward to getting some fe
On Mon, Sep 8, 2014 at 10:00 AM, Benjamin Root wrote:
> Btw, on a somewhat related note, whoever can implement ndarray to be able
> to use views from other ndarrays stitched together would get a fruit basket
> from me come the holidays and possibly naming rights for the next kid...
>
Ben, you sh
Btw, on a somewhat related note, whoever can implement ndarray to be able
to use views from other ndarrays stitched together would get a fruit basket
from me come the holidays and possibly naming rights for the next kid...
Cheers!
Ben Root
On Mon, Sep 8, 2014 at 12:55 PM, Benjamin Root wrote:
>
A use case would be "image stitching" or even data tiling. I have had to
implement something like this at work (so, I can't share it, unfortunately)
and it even goes so far as to allow the caller to specify how much the
tiles can overlap and such. The specification is ungodly hideous and I
doubt I
Sturla: im not sure if the intention is always unambiguous, for such more
flexible arrangements.
Also, I doubt such situations arise often in practice; if the arrays arnt a
grid, they are probably a nested grid, and the code would most naturally
concatenate them with nested calls to a stacking fun
On Mon, Sep 8, 2014 at 12:10 PM, Jaime Fernández del Río <
jaime.f...@gmail.com> wrote:
> On Mon, Sep 8, 2014 at 7:41 AM, Sturla Molden
> wrote:
>
>> Stefan Otte wrote:
>>
>> > stack([[a, b], [c, d]])
>> >
>> > In my case `stack` replaced `hstack` and `vstack` almost completely.
>> >
>> > If
On 8 Sep 2014 10:42, "Sturla Molden" wrote:
>
> Stefan Otte wrote:
>
> > stack([[a, b], [c, d]])
> >
> > In my case `stack` replaced `hstack` and `vstack` almost completely.
> >
> > If you're interested in including it in numpy I created a pull request
> > [1]. I'm looking forward to getting
On Mon, Sep 8, 2014 at 7:41 AM, Sturla Molden
wrote:
> Stefan Otte wrote:
>
> > stack([[a, b], [c, d]])
> >
> > In my case `stack` replaced `hstack` and `vstack` almost completely.
> >
> > If you're interested in including it in numpy I created a pull request
> > [1]. I'm looking forward to
On Mon, Sep 8, 2014 at 10:41 AM, Sturla Molden
wrote:
> Stefan Otte wrote:
>
> > stack([[a, b], [c, d]])
> >
> > In my case `stack` replaced `hstack` and `vstack` almost completely.
> >
> > If you're interested in including it in numpy I created a pull request
> > [1]. I'm looking forward to
Stefan Otte wrote:
> stack([[a, b], [c, d]])
>
> In my case `stack` replaced `hstack` and `vstack` almost completely.
>
> If you're interested in including it in numpy I created a pull request
> [1]. I'm looking forward to getting some feedback!
As far as I can see, it uses hstack and vsta
Hey,
quite often I work with block matrices. Matlab offers the convenient notation
[ a b; c d ]
to stack matrices. The numpy equivalent is kinda clumsy:
vstack([hstack([a,b]), hstack([c,d])])
I wrote the little function `stack` that does exactly that:
stack([[a, b], [c, d]])
In my ca
24 matches
Mail list logo