Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: array coding problem
Post: RE: array coding problem
Thanks
I note that you have used a FOR loop. I am trying to vectorise my code to keep it fast. Is there a vectorised solution? This code runs very slowly.
cheers Peter |
|
pberrett |
Data Science |
3 |
1,995 |
May-06-2020, 12:51 PM |
|
|
Thread: array coding problem
Post: array coding problem
Hi everyone
I have a 3d numpy array called p as follows
array([[[0, 1, 2],
[3, 4, 5],
[6, 7, 8]],
[[0, 1, 2],
[3, 4, 5],
[6, 7, 8]],
[[0, 1, 2],
... |
|
pberrett |
Data Science |
3 |
1,995 |
May-06-2020, 09:31 AM |
|
|
Thread: Help with array manipulation
Post: RE: Help with array manipulation
Hi and thanks again
The need for Numpy arises because I am processing a very large number of images. Each image is 1024 x 0124 and in its raw state has r,g,b values (color), each 256. I only use the ... |
|
pberrett |
General Coding Help |
4 |
2,399 |
Mar-30-2020, 03:02 AM |
|
|
Thread: Help with array manipulation
Post: RE: Help with array manipulation
Sure and thanks
Here's my test program
# -*- coding: utf-8 -*-
"""
Created on Sat Mar 28 18:06:12 2020
@author: pberr
"""
#asetup array for test
a = [[1,2,3],[4,5,6],[7,8,9]]
#filter
if a<3 or... |
|
pberrett |
General Coding Help |
4 |
2,399 |
Mar-28-2020, 07:25 AM |
|
|
Thread: Help with array manipulation
Post: Help with array manipulation
Hi all
I have a relatively simple problem concerning arrays but I have read through several python training packages looking for an appropriate function without success
Here is my problem. I have an... |
|
pberrett |
General Coding Help |
4 |
2,399 |
Mar-22-2020, 01:42 PM |
|
|
Thread: Hardware question re running Anaconda
Post: RE: Hardware question re running Anaconda
Thanks
I will give it a try.
cheers Peter |
|
pberrett |
General Coding Help |
6 |
2,969 |
Jan-23-2020, 11:17 AM |
|
|
Thread: Hardware question re running Anaconda
Post: RE: Hardware question re running Anaconda
Thanks
I will try Cupy. Is it going to run faster with an older graphics card like my Nvidia Geforce 720?
cheers Peter |
|
pberrett |
General Coding Help |
6 |
2,969 |
Jan-23-2020, 04:24 AM |
|
|
Thread: Hardware question re running Anaconda
Post: Hardware question re running Anaconda
Hi everyone
I have written a computationally intensive program which I have optimised for speed by using Numpy. Still its a bit slow for my needs and I am looking at other ways of running it faster.
... |
|
pberrett |
General Coding Help |
6 |
2,969 |
Jan-23-2020, 01:54 AM |
|
|
Thread: Addressing with np.where
Post: Addressing with np.where
Hi everyone
I am rewriting my program to eliminate for loops and using numpy arrays to do so.
I am stuck at the following problem.
First here is my numpy array called 'second'.
print (second)
[[[ 5... |
|
pberrett |
Data Science |
0 |
1,567 |
May-19-2019, 12:45 PM |
|
|
Thread: Multiplying two lists to make an array
Post: RE: Multiplying two lists to make an array
I tried measuring the time each routine takes using the following code
import time
start = time. time()
...
end = time. time()
print(end - start)but I found the times changed each time I ran th... |
|
pberrett |
General Coding Help |
15 |
5,818 |
May-14-2019, 09:27 AM |
|
|
Thread: Multiplying two lists to make an array
Post: RE: Multiplying two lists to make an array
(May-14-2019, 12:08 AM)michalmonday Wrote: Normally I would issue warnings for users who provide substantial code for a question that has shown no effort, but since several regulars did it this time... |
|
pberrett |
General Coding Help |
15 |
5,818 |
May-14-2019, 02:54 AM |
|
|
Thread: Multiplying two lists to make an array
Post: Multiplying two lists to make an array
How have two lists of unequal length with values in each. I want to multiply these two lists to make an array containing a formula applied to each combination of values
eg
a = [1,2,3,4]
b = [0,1,2]a... |
|
pberrett |
General Coding Help |
15 |
5,818 |
May-13-2019, 01:09 PM |
|
|
Thread: Help with speed up my subroutine
Post: Help with speed up my subroutine
Hi everyone
I have a difficult problem that I am tryng to solve. Is there anyone brave enough to try and tackle it?
I have written a program to find comets in images. The images I am examining are i... |
|
pberrett |
Data Science |
1 |
1,801 |
May-12-2019, 06:36 AM |
|
|
Thread: Still struggling with np.where...
Post: Still struggling with np.where...
Hello everyone
Despite some help on this forum I am still struggling with np.where
Can someone help solve my problem?
I have a numpy array derived from an image which is 1024 x 1024 x 4 in size. e... |
|
pberrett |
General Coding Help |
1 |
1,854 |
May-09-2019, 12:06 PM |
|
|
Thread: Numpy question
Post: RE: Numpy question
Hello again
I'm still having a few problems using np.where. Can someone please help? An example will assist.
first lets create a 10 x 10 grid filled with numbers
a = np.arange(1,101).reshape(10,10)... |
|
pberrett |
General Coding Help |
3 |
2,677 |
May-04-2019, 09:45 AM |
|
|
Thread: Numpy question
Post: Numpy question
Hi all
I have a question about extracting data from a numpy array in an efficient manner. Can anyone help?
The example is simple. I have a numpy array which is an image 100 x 100 pixels. lets call t... |
|
pberrett |
General Coding Help |
3 |
2,677 |
Apr-27-2019, 05:35 AM |
|
|
Thread: Optimisation problem - star identification
Post: Optimisation problem - star identification
Hi everyone
I have written a comet finding program however I find it runs a bit slow for my liking. I have been able to speed it up by using numba (compiler) but I probably can optimise the program f... |
|
pberrett |
General Coding Help |
1 |
2,262 |
Mar-31-2019, 01:51 PM |
|
|
Thread: Help wth web page question
Post: RE: Help wth web page question
Thanks
With respect to your solution, I don't want any user input from a keyboard or elsewhere. basically what is happening is this. I have a small radio receiving device that is receiving the freque... |
|
pberrett |
Web Scraping & Web Development |
2 |
3,457 |
Aug-31-2017, 12:33 AM |
|
|
Thread: Help wth web page question
Post: Help wth web page question
Hi all
I am using python 2 on a Raspberry Pi microcomputer.
What I am trying to achieve is fairly straightforward. I have a URL which is stored in a string called A. First I want to open a web page ... |
|
pberrett |
Web Scraping & Web Development |
2 |
3,457 |
Aug-28-2017, 09:00 AM |
|
|
Thread: Convert .MTS files
Post: RE: Convert .MTS files
Hi all
I have finished my program and it works fine. Thanks to everyone who helped. Here is the finished result.
#Program for converting .mts files to .mp4 files and uploading these to a server.
im... |
|
pberrett |
General Coding Help |
16 |
16,565 |
Apr-16-2017, 03:54 PM |