Skip to content

Commit 5fe0a8e

Browse files
authored
Merge pull request #154 from ArnauMiro/fix-imports
Change plots import
2 parents 5d70ace + bdbc01b commit 5fe0a8e

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

Diff for: Examples/NN/SHRED/example_03_inference_shred_cylinder.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,14 @@
106106

107107
## Plot error bars
108108
#Non-scaled
109-
fig, _ = pyLOM.utils.plotModalErrorBars(meanMRE)
109+
fig, _ = pyLOM.NN.plotModalErrorBars(meanMRE)
110110
fig.savefig('errorbars.pdf', dpi=300, bbox_inches='tight')
111111
#Scaled
112-
fig, _ = pyLOM.utils.plotModalErrorBars(Sscale*meanMRE)
112+
fig, _ = pyLOM.NN.plotModalErrorBars(Sscale*meanMRE)
113113
fig.savefig('errorbars_scaled.pdf', dpi=300, bbox_inches='tight')
114114

115115
## Plot POD modes reconstruction
116-
fig, _ = pyLOM.utils.plotTimeSeries(time, full_pod, meanout, stdout)
116+
fig, _ = pyLOM.NN.plotTimeSeries(time, full_pod, meanout, stdout)
117117
fig.savefig('output_modes.pdf', dpi=600)
118118

119119

Diff for: docs/source/notebook_examples/NN/SHRED/step_01_SVD_and_sensor_cylinder.ipynb

+4-4
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@
625625
},
626626
{
627627
"cell_type": "code",
628-
"execution_count": 27,
628+
"execution_count": null,
629629
"metadata": {},
630630
"outputs": [
631631
{
@@ -640,7 +640,7 @@
640640
}
641641
],
642642
"source": [
643-
"fig, _ = pyLOM.utils.plotModalErrorBars(MRE)"
643+
"fig, _ = pyLOM.NN.plotModalErrorBars(MRE)"
644644
]
645645
},
646646
{
@@ -652,7 +652,7 @@
652652
},
653653
{
654654
"cell_type": "code",
655-
"execution_count": 28,
655+
"execution_count": null,
656656
"metadata": {},
657657
"outputs": [
658658
{
@@ -667,7 +667,7 @@
667667
}
668668
],
669669
"source": [
670-
"fig, _ = pyLOM.utils.plotTimeSeries(time, full_pod, outres)"
670+
"fig, _ = pyLOM.NN.plotTimeSeries(time, full_pod, outres)"
671671
]
672672
},
673673
{

Diff for: pyLOM/NN/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
1212
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
1313

14-
from ..utils.plots import plotSnapshot
14+
from ..utils.plots import plotSnapshot, plotModalErrorBars, plotTimeSeries
1515

1616
from .pipeline import Pipeline
1717
from .utils import Dataset, MinMaxScaler, select_device, betaLinearScheduler, create_results_folder, set_seed

Diff for: pyLOM/utils/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
from .parall import worksplit, writesplit, is_rank_or_serial, pprint
1414
from .mpi import MPI_COMM, MPI_RANK, MPI_SIZE, mpi_barrier, mpi_send, mpi_recv, mpi_sendrecv, mpi_scatter, mpi_gather, mpi_reduce, mpi_bcast
1515
from .gpu import gpu_device, gpu_to_cpu, cpu_to_gpu, ascontiguousarray
16-
from .plots import plotModalErrorBars, plotTimeSeries
1716

1817

1918
del errors, parall

0 commit comments

Comments
 (0)