ee.Array.log10
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Calcule le logarithme en base 10 de l'entrée, élément par élément.
Utilisation | Renvoie |
---|
Array.log10() | Tableau |
Argument | Type | Détails |
---|
ceci : input | Tableau | Tableau d'entrée. |
Exemples
Éditeur de code (JavaScript)
print(ee.Array([0.1, 1, 10, 100]).log10()); // [-1,0,1,2]
var start = 0.1;
var end = 100;
var points = ee.Array(ee.List.sequence(start, end, null, 50));
var values = points.log10();
// Plot log10() defined above.
var chart = ui.Chart.array.values(values, 0, points)
.setOptions({
viewWindow: {min: start, max: end},
hAxis: {
title: 'x',
viewWindowMode: 'maximized',
},
vAxis: {
title: 'log10(x)',
},
lineWidth: 1,
pointSize: 0,
});
print(chart);
Configuration de Python
Consultez la page
Environnement Python pour en savoir plus sur l'API Python et sur l'utilisation de geemap
pour le développement interactif.
import ee
import geemap.core as geemap
Colab (Python)
import altair as alt
import pandas as pd
display(ee.Array([0.1, 1, 10, 100]).log10()) # [-1,0,1,2]
start = 0.1
end = 100
points = ee.Array(ee.List.sequence(start, end, None, 50))
values = points.log10()
df = pd.DataFrame({'x': points.getInfo(), 'log10(x)': values.getInfo()})
# Plot log10() defined above.
alt.Chart(df).mark_line().encode(
x=alt.X('x'),
y=alt.Y('log10(x)')
)
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/26 (UTC).
[null,null,["Dernière mise à jour le 2025/07/26 (UTC)."],[[["\u003cp\u003eCalculates the base-10 logarithm for each element within an input array.\u003c/p\u003e\n"],["\u003cp\u003eReturns a new array containing the calculated logarithms.\u003c/p\u003e\n"],["\u003cp\u003eAccepts a single argument: the input array.\u003c/p\u003e\n"],["\u003cp\u003eUsable in both server-side (JavaScript) and client-side (Python) environments.\u003c/p\u003e\n"]]],[],null,["# ee.Array.log10\n\nOn an element-wise basis, computes the base-10 logarithm of the input.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-----------------|---------|\n| Array.log10`()` | Array |\n\n| Argument | Type | Details |\n|---------------|-------|------------------|\n| this: `input` | Array | The input array. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\nprint(ee.Array([0.1, 1, 10, 100]).log10()); // [-1,0,1,2]\n\nvar start = 0.1;\nvar end = 100;\nvar points = ee.Array(ee.List.sequence(start, end, null, 50));\nvar values = points.log10();\n\n// Plot log10() defined above.\nvar chart = ui.Chart.array.values(values, 0, points)\n .setOptions({\n viewWindow: {min: start, max: end},\n hAxis: {\n title: 'x',\n viewWindowMode: 'maximized',\n },\n vAxis: {\n title: 'log10(x)',\n },\n lineWidth: 1,\n pointSize: 0,\n });\nprint(chart);\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\nimport altair as alt\nimport pandas as pd\n\ndisplay(ee.Array([0.1, 1, 10, 100]).log10()) # [-1,0,1,2]\n\nstart = 0.1\nend = 100\npoints = ee.Array(ee.List.sequence(start, end, None, 50))\nvalues = points.log10()\n\ndf = pd.DataFrame({'x': points.getInfo(), 'log10(x)': values.getInfo()})\n\n# Plot log10() defined above.\nalt.Chart(df).mark_line().encode(\n x=alt.X('x'),\n y=alt.Y('log10(x)')\n)\n```"]]