Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: How to change the font size of a table?
Post: How to change the font size of a table?
Hi,
I'm fighting for hours to change the size of the numbers which fills the cells of a table created with matplotlib. Here's my code for a subplot table:
rows = ['%d' % i for i in np.arange(1,prism+... |
|
Felipe |
General Coding Help |
0 |
4,152 |
Jul-12-2017, 06:52 PM |
|
|
Thread: How to join elements from two arrays in a third one?
Post: RE: How to join elements from two arrays in a thir...
(Jul-12-2017, 01:30 PM)ichabod801 Wrote: This calls for the zip function. You want to zip the two matrices, and then loop over that. that will give you two rows each time through the loop:
for row1... |
|
Felipe |
General Coding Help |
2 |
3,293 |
Jul-12-2017, 02:29 PM |
|
|
Thread: How to join elements from two arrays in a third one?
Post: How to join elements from two arrays in a third on...
Hi guys,
I have two arrays "p" and "prec" as the following.
p:
Output:[[ 2 -30 20 4]
[ 2 -28 30 4]
[ 2 19 50 6]
[ 1 -27 60 3]
[ 2 3 71 6]]prec:
Output:[[ 0 0.1 0 0.1]
[ 0 ... |
|
Felipe |
General Coding Help |
2 |
3,293 |
Jul-12-2017, 12:20 PM |
|
|
Thread: How to concatenate elements of different type in a table cell?
Post: RE: How to concatenate elements of different type ...
(Jul-07-2017, 10:46 AM)Larz60+ Wrote: You should be able to convert the numpy array to a list like:
import numpy as np
your_nump_array = [] # replace with your data
plist = np.array(your_nump_array... |
|
Felipe |
Data Science |
8 |
4,963 |
Jul-07-2017, 10:59 AM |
|
|
Thread: How to concatenate elements of different type in a table cell?
Post: RE: How to concatenate elements of different type ...
(Jul-07-2017, 03:19 AM)Larz60+ Wrote: question 1
Ok, so the p array is actually a text buffer that contains values of an array, but not a syntactically correct python structure.
is that correct?
qu... |
|
Felipe |
Data Science |
8 |
4,963 |
Jul-07-2017, 10:37 AM |
|
|
Thread: How to concatenate elements of different type in a table cell?
Post: RE: How to concatenate elements of different type ...
(Jul-07-2017, 12:05 AM)Larz60+ Wrote: I'm still not sure what you're trying to do, but to use a 'list' in python
(which is an array), and split off the mantissa and exponent of a float,
you can use... |
|
Felipe |
Data Science |
8 |
4,963 |
Jul-07-2017, 01:07 AM |
|
|
Thread: How to concatenate elements of different type in a table cell?
Post: RE: How to concatenate elements of different type ...
(Jul-06-2017, 03:03 PM)Larz60+ Wrote: please provide some raw data before the slice
Here's my array p:
[[2.07155254 -20.60156854 19.5483871 4.19432936]
[1.76661686 -32.39288267 30.23363804 3.... |
|
Felipe |
Data Science |
8 |
4,963 |
Jul-06-2017, 10:38 PM |
|
|
Thread: How to concatenate elements of different type in a table cell?
Post: How to concatenate elements of different type in a...
Hi guys,
I wrote a code to print some tables, and to do that I used the following lines of code to fill my cells with the values of my array p:
for row in range(prism):
cell_text.append(['%d' % it... |
|
Felipe |
Data Science |
8 |
4,963 |
Jul-06-2017, 02:57 PM |
|
|
Thread: How to plot legend for a colormap?
Post: RE: How to plot legend for a colormap?
Hi all,
I wrote a more complete function which works well too, but I still have no idea, about how to display a color bar based on the colors that fills the rectangles. Here's the updated code:
impo... |
|
Felipe |
Data Science |
1 |
4,254 |
Jun-05-2017, 06:58 PM |
|
|
Thread: How to plot legend for a colormap?
Post: How to plot legend for a colormap?
Hi guys,
I wrote a function that plot rectangles filled with colors defined by a colormap. Here's a part of the function:
import matplotlib.pyplot as plt
from matplotlib.patches import Rectangle
fro... |
|
Felipe |
Data Science |
1 |
4,254 |
Jun-02-2017, 10:00 PM |
|
|
Thread: Matrix with bounded random numbers
Post: RE: Matrix with bounded random numbers
(May-19-2017, 04:57 PM)zivoni Wrote: lb + (ub - lb) * np.random.random((4, 1)) if you want for each row inequalities (lb <= row) & (row < ub)
Thanks !!! That solved my problem. |
|
Felipe |
Data Science |
2 |
3,783 |
May-21-2017, 11:31 AM |
|
|
Thread: Matrix with bounded random numbers
Post: Matrix with bounded random numbers
Hi everyone,
I want to construct a matrix with aleatory numbers that are limited by previously determined values. These values are gave in arrays which contains the upper (ub) and lower bounds (lb).... |
|
Felipe |
Data Science |
2 |
3,783 |
May-19-2017, 11:36 AM |
|
|
Thread: How to parallelize an 2D array?
Post: RE: How to parallelize an 2D array?
(May-11-2017, 04:57 PM)nilamo Wrote: It depends on how much data there is. Starting processes and passing data to and from them is not free, that takes time. So if there isn't a lot of data (like,... |
|
Felipe |
Data Science |
8 |
10,541 |
May-13-2017, 05:11 PM |
|
|
Thread: How to parallelize an 2D array?
Post: RE: How to parallelize an 2D array?
(May-11-2017, 05:08 AM)nilamo Wrote: (May-10-2017, 07:03 PM)Felipe Wrote: itertools.chain object at 0x7fc104ab4d30
Output:D:\Projects\playground>python temp.py
felipe => 19.259355361720637
m... |
|
Felipe |
Data Science |
8 |
10,541 |
May-11-2017, 01:44 PM |
|
|
Thread: How to sum elements of same position in n dimensional array
Post: RE: How to sum elements of same position in n dime...
(May-11-2017, 09:12 AM)zivoni Wrote: It seems that you can use .sum() method with axis parameter.
In [1]: import numpy as np
In [2]: a = np.array([[[1,2], [3,4]], [[10, 20], [30, 40]]])
In [3]: a... |
|
Felipe |
Data Science |
2 |
4,139 |
May-11-2017, 10:33 AM |
|
|
Thread: How to sum elements of same position in n dimensional array
Post: How to sum elements of same position in n dimensio...
Hi, guys,
I have a numpy array of (2,100,2) dimensions, that I want to sum elements of the same position. In order to clarify my doubts, I wrote the example below where I substituted the numbers by l... |
|
Felipe |
Data Science |
2 |
4,139 |
May-11-2017, 12:09 AM |
|
|
Thread: How to parallelize an 2D array?
Post: RE: How to parallelize an 2D array?
(May-10-2017, 09:49 PM)nilamo Wrote: Could you edit your post, or re-post your code, so it has indentation? That way we can try a few things and time them to see which is faster for your use case.
... |
|
Felipe |
Data Science |
8 |
10,541 |
May-10-2017, 10:15 PM |
|
|
Thread: How to parallelize an 2D array?
Post: RE: How to parallelize an 2D array?
(May-10-2017, 07:08 PM)Mekire Wrote: Why do you believe you need to parallelize this?
You seem to be using numpy incorrectly/badly so you should probably address that first.
>>> import num... |
|
Felipe |
Data Science |
8 |
10,541 |
May-10-2017, 07:18 PM |
|
|
Thread: How to parallelize an 2D array?
Post: How to parallelize an 2D array?
Hi guys,
I need to parallelize my code to improve it's velocity. I tried to understand how to do it reading some internet tutorials, but without success. In order to learn how it works, I wrote some ... |
|
Felipe |
Data Science |
8 |
10,541 |
May-10-2017, 07:03 PM |
|
|
Thread: Improve the velocity of the minimization
Post: Improve the velocity of the minimization
Hi guys,
I'm using Python to do the inversion of a problem with many variables. The number of variables changes with the desired model, in some cases can be 4 in others 40. Basically my code has a ob... |
|
Felipe |
General Coding Help |
0 |
2,433 |
May-09-2017, 12:06 PM |