It'd be really cool if I could do this:
void func(int[] vector, int[] bounds) {
assert(vector[] >= 0 && vector[] < bounds[]);
...
}
Is there any reason why we shouldn't implement this?
T
--
He who laughs last thinks slowest.
On 03/06/2012 09:30 PM, H. S. Teoh wrote:
It'd be really cool if I could do this:
void func(int[] vector, int[] bounds) {
assert(vector[]>= 0&& vector[]< bounds[]);
...
}
Is there any reason why we shouldn't implement this?
T
Comparing arra
On Tue, Mar 06, 2012 at 09:35:11PM +0100, Timon Gehr wrote:
> On 03/06/2012 09:30 PM, H. S. Teoh wrote:
> >It'd be really cool if I could do this:
> >
> > void func(int[] vector, int[] bounds) {
> > assert(vector[]>= 0&& vector[]< bounds[]);
> > ...
> > }
> >
> >Is
On 3/6/2012 2:30 PM, H. S. Teoh wrote:
It'd be really cool if I could do this:
void func(int[] vector, int[] bounds) {
assert(vector[]>= 0&& vector[]< bounds[]);
...
}
Is there any reason why we shouldn't implement this?
T
This same problem
On Tue, 06 Mar 2012 21:35:11 +0100, Timon Gehr wrote:
On 03/06/2012 09:30 PM, H. S. Teoh wrote:
It'd be really cool if I could do this:
void func(int[] vector, int[] bounds) {
assert(vector[]>= 0&& vector[]< bounds[]);
...
}
Is there any reas
On Tuesday, 6 March 2012 at 20:28:40 UTC, H. S. Teoh wrote:
It'd be really cool if I could do this:
void func(int[] vector, int[] bounds) {
assert(vector[] >= 0 && vector[] < bounds[]);
...
}
Is there any reason why we shouldn't implement this?
On 7 March 2012 10:58, Kapps wrote:
> On Tuesday, 6 March 2012 at 20:28:40 UTC, H. S. Teoh wrote:
>>
>> It'd be really cool if I could do this:
>>
>> void func(int[] vector, int[] bounds) {
>> assert(vector[] >= 0 && vector[] < bounds[]);
>>
>> ...
>> }
On Tuesday, 6 March 2012 at 23:57:07 UTC, James Miller wrote:
On 7 March 2012 10:58, Kapps wrote:
On Tuesday, 6 March 2012 at 20:28:40 UTC, H. S. Teoh wrote:
It'd be really cool if I could do this:
void func(int[] vector, int[] bounds) {
assert(vector[] >= 0 && vector[]
On 7 March 2012 15:35, Peter Alexander wrote:
> On Tuesday, 6 March 2012 at 23:57:07 UTC, James Miller wrote:
>>
>> On 7 March 2012 10:58, Kapps wrote:
>>>
>>> On Tuesday, 6 March 2012 at 20:28:40 UTC, H. S. Teoh wrote:
It'd be really cool if I could do this:
void
James Miller:
> What? I'm assuming you mean that you expect an array of `bool`s?
Right. Vector operations like a[]>> from numpy import *
>>> a = array([3,6,8,9])
>>> a == 6
array([False, True, False, False], dtype=bool)
>>> a >= 7
array([False, False, True, True], dtype=bool)
>>> a < 5
array([
On 7 March 2012 17:03, bearophile wrote:
> James Miller:
>
>> What? I'm assuming you mean that you expect an array of `bool`s?
>
> Right. Vector operations like a[] To see how this is useful you probably must think in terms of vector-style
> programming. In NumPy the use of arrays of booleans is
On 03/06/2012 09:58 PM, H. S. Teoh wrote:
On Tue, Mar 06, 2012 at 09:35:11PM +0100, Timon Gehr wrote:
On 03/06/2012 09:30 PM, H. S. Teoh wrote:
It'd be really cool if I could do this:
void func(int[] vector, int[] bounds) {
assert(vector[]>= 0&& vector[]< bounds[]);
On 03/06/2012 10:10 PM, Simen Kjærås wrote:
On Tue, 06 Mar 2012 21:35:11 +0100, Timon Gehr wrote:
On 03/06/2012 09:30 PM, H. S. Teoh wrote:
It'd be really cool if I could do this:
void func(int[] vector, int[] bounds) {
assert(vector[]>= 0&& vector[]< bounds[]);
...
}
Is there any reason wh
13 matches
Mail list logo